Skip to content

Instantly share code, notes, and snippets.

@technocrat
Created September 10, 2015 00:23
Show Gist options
  • Save technocrat/7bf309f382892361f35b to your computer and use it in GitHub Desktop.
Save technocrat/7bf309f382892361f35b to your computer and use it in GitHub Desktop.
> ls(pattern = 'all')
[1] "allid" "allpct" "allpop"
> objs <- ls(pattern = 'all')
> str(objs)
chr [1:3] "allid" "allpct" "allpop"
> class(objs)
[1] "character"
> mode(objs)
[1] "character"
> typeof(objs)
[1] "character"
> help(list)
> is.list(objs)
[1] FALSE
> foo <- list(objs)
> is.list(foo)
[1] TRUE
> str(foo)
List of 1
$ : chr [1:3] "allid" "allpct" "allpop"
# note the $ :
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment