Yup, DailyDiary[[1]] did it, thanks!

On Thu, Oct 13, 2011 at 11:43 PM, Jeff Newmiller [via R] <
ml-node+s789695n3903955h85@n4.nabble.com> wrote:

> You haven't provided a reproducible example. You haven't even provided a
> subset of your data, or the commands you used to read it in.
> I might guess that
>
> VAL <- DailyDiary[[1]]
>
> might be what you wanted, and the "str" function might help you understand
> why. Also, the "c" function does not "coerce" object types... it embeds the
> arguments into a new vector.
> ---------------------------------------------------------------------------
>
> Jeff Newmiller The ..... ..... Go Live...
> DCN:<[hidden email] <http://user/SendEmail.jtp?type=node&node=3903955&i=0>>
> Basics: ##.#. ##.#. Live Go...
> Live: OO#.. Dead: OO#.. Playing
> Research Engineer (Solar/Batteries O.O#. #.O#. with
> /Software/Embedded Controllers) .OO#. .OO#. rocks...1k
> ---------------------------------------------------------------------------
>
> Sent from my phone. Please excuse my brevity.
>
> jawbonemurphy <[hidden email]<http://user/SendEmail.jtp?type=node&node=3903955&i=1>>
> wrote:
>
> I have a related question...I have a data frame similar with 74 rows that I
>
> created with "header=TRUE", but when I try to coerce one of the data frame
> columns into a vector, it shows up as having length 1, even though when I
> print it, it shows 74 elements:
>
> > VAL <- c(DailyDiary[1])
> > VAL
> > [1] 3 3 3 2 3 3 4 4 3 3 2 1 1 4 3 3 2 3 3 2 2 3 3 3 1 2 2
> [28] 1 1 3 3 3 2 4 3 2 3 4 3 3 3 3 4 3 2 3 2 3 1 2 1 2 3 1
> [55] 0 3 2 4 3 1 2 3 1 1 1 4 3 2 1 2 3 3 3 2
> >length(VAL)
> [1] 1
>
> On the other hand, I can easily coerce the row names to a vector of length
> 74
>
> > partf <- row.names(DailyDiary)
> > length(partf)
> [1] 74
>
> What I would like to do is make VAL into a vector with length 74 instead of
>
> length 1 so I can sort it using use "partf" as factors. I tried
> "as.vector", but it doesn't let you specify the length. Any ideas? Thanks,
> and sorry if I'm being unclear or stupid, I'm a newbie :)
>
> Logan
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/Length-of-data-frame-column-tp864585p3903892.html
> Sent from the R help mailing list archive at Nabble.com.
>
> _____________________________________________
>
> [hidden email] <http://user/SendEmail.jtp?type=node&node=3903955&i=2>mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] <http://user/SendEmail.jtp?type=node&node=3903955&i=3>mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://r.789695.n4.nabble.com/Length-of-data-frame-column-tp864585p3903955.html
>  To unsubscribe from Length of data.frame column, click here<http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=864585&code=amR1cmxhbmRzdGVyQGdtYWlsLmNvbXw4NjQ1ODV8MTg1MjIxNzE3OQ==>.
>
>


--
View this message in context: http://r.789695.n4.nabble.com/Length-of-data-frame-column-tp864585p3903963.html
Sent from the R help mailing list archive at Nabble.com.
	[[alternative HTML version deleted]]

