Re: [R] NROW doesn't equal length(x)

2011-11-01 Thread R. Michael Weylandt
] NROW doesn't equal length(x) Data frame is list internally so length(df) = ncol(df) M On Oct 27, 2011, at 2:44 PM, Muhammad Abuizzah izzah...@yahoo.com wrote: Hi, I am converting a data.frame to xts.  the data.frame is 4 columns and 1000 rows.  I get a message that NROW (x) must match

Re: [R] NROW doesn't equal length(x)

2011-11-01 Thread R. Michael Weylandt
formate thanks - Original Message - From: R. Michael Weylandt michael.weyla...@gmail.com michael.weyla...@gmail.com To: Muhammad Abuizzah izzah...@yahoo.com Cc: r-help@R-project.org r-help@r-project.org Sent: Thursday, October 27, 2011 3:23 PM Subject: Re: [R] NROW doesn't equal

Re: [R] NROW doesn't equal length(x)

2011-10-28 Thread MacQueen, Don
And to further the example, length() of matrix is not equal to the number of rows either. mm - matrix(1:6, ncol=2) length(mm) [1] 6 dim(mm) [1] 3 2 Also, NROW() and nrow() are different; I'd be cautious about using NROW without making sure I understood the difference. NROW function (x) if

[R] NROW doesn't equal length(x)

2011-10-27 Thread Muhammad Abuizzah
Hi, I am converting a data.frame to xts.  the data.frame is 4 columns and 1000 rows.  I get a message that NROW (x) must match length(order.by) class is data.frame, mode is list when I run  dim(x)   # I get  1000     4   #which is consistent with 1000 rows and 4 columns NROW (x)  # I get 1000

Re: [R] NROW doesn't equal length(x)

2011-10-27 Thread R. Michael Weylandt michael.weyla...@gmail.com
Data frame is list internally so length(df) = ncol(df) M On Oct 27, 2011, at 2:44 PM, Muhammad Abuizzah izzah...@yahoo.com wrote: Hi, I am converting a data.frame to xts. the data.frame is 4 columns and 1000 rows. I get a message that NROW (x) must match length(order.by) class is