summaryrefslogtreecommitdiffhomepage
path: root/r.html.markdown
diff options
context:
space:
mode:
authorAdam Bard <github@adambard.com>2013-07-01 19:23:53 -0700
committerAdam Bard <github@adambard.com>2013-07-01 19:23:53 -0700
commit05d3fa73aef6f0a4c629d72f0474cd8e7ddc444d (patch)
tree383a5ef15fdea880135924190ae1dbb367c20baa /r.html.markdown
parent555a67424d2441100e725ed1b2cae7b5cb539eb2 (diff)
parentb751e00faa8480c5dbb2f9155e362fbff02c4b82 (diff)
Merge pull request #83 from josericardo/fixing-list-initialization
Fixing list initialization in the R example.
Diffstat (limited to 'r.html.markdown')
-rw-r--r--r.html.markdown3
1 files changed, 2 insertions, 1 deletions
diff --git a/r.html.markdown b/r.html.markdown
index 2cf63288..535b9065 100644
--- a/r.html.markdown
+++ b/r.html.markdown
@@ -260,7 +260,8 @@ array(c(c(c(2,300,4),c(8,9,0)),c(c(5,60,0),c(66,7,847))), dim=c(3,2,2))
# LISTS (MULTI-DIMENSIONAL, POSSIBLY RAGGED, OF DIFFERENT TYPES)
# Finally, R has lists (of vectors)
-list1 <- list(time = 1:40, price = c(rnorm(40,.5*list1$time,4))) # random
+list1 <- list(time = 1:40)
+list1$price = c(rnorm(40,.5*list1$time,4)) # random
list1
# You can get items in the list like so