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
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?
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
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
__
4 matches
Mail list logo