Re: [R] dput data frame

2011-08-24 Thread Dennis Murphy
Hi: Try this instead: m <- matrix(rpois(40, 10), nrow = 1) > dim(m) [1] 140 r <- m[1:10, 3:6] dput(r) structure(c(12, 7, 15, 8, 6, 7, 14, 10, 11, 4, 9, 16, 12, 5, 9, 10, 9, 9, 8, 7, 12, 9, 10, 12, 12, 11, 11, 8, 12, 8, 15, 21, 3, 3, 13, 9, 8, 13, 7, 11), .Dim = c(10L, 4L)) # Alte

Re: [R] dput data frame

2011-08-24 Thread David Winsemius
On Aug 24, 2011, at 6:48 PM, Jeffrey Joh wrote: I have a data frame that is about 40 columns by 1 rows. I want to get the dput of small portion of that by using dput(results[1:10,3:6]). The dput is very long and includes all the values from the original data frame. Why is that?

Re: [R] dput data frame

2011-08-24 Thread R. Michael Weylandt
How are you storing the elements of the data frame? I'm working with a data frame of doubles with no names and having trouble observing the same problem. If they are factor levels though, that *might* account for it. sessionInfo() might also help. Obviously it's not convenient to print this example

[R] dput data frame

2011-08-24 Thread Jeffrey Joh
I have a data frame that is about 40 columns by 1 rows. I want to get the dput of small portion of that by using dput(results[1:10,3:6]). The dput is very long and includes all the values from the original data frame. Why is that? Jeffrey __