From b751e00faa8480c5dbb2f9155e362fbff02c4b82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Ricardo?= Date: Mon, 1 Jul 2013 22:34:40 -0300 Subject: Fixing list initialization in the R example. --- r.html.markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/r.html.markdown b/r.html.markdown index 38317776..3f681c88 100644 --- a/r.html.markdown +++ b/r.html.markdown @@ -243,7 +243,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 -- cgit v1.2.3