Re: [R] type of object of a variable in a data frame

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Wed, 12 Mar 2008 19:23:48 -0400

class(data)
class(data$V1)
str(data)
str(data$V1)
dput(data)
dput(data$V1)

On Wed, Mar 12, 2008 at 7:17 PM, Chang Liu <changisme_at_hotmail.com> wrote:
>
> Hello!
> I have used read.csv to read in a data frame, and there are a few variables in it, however, when I tried
> is.list(data$V1)
> >FALSE
> In fact, I have tried, they are not vectors either.
>
> I'm wondering:
> 1. What objects are these "lists" of data?
> 2. How could I find out about the type/inheritence of an object in general?
> 3. The reason I want it to be a list or vector, is that I want to fill in some blank values, i can't seem to do things like:
> data$V1[1] = 3
> Is it because these variables are pointers? Is there a better way to do this?
>
> Sorry to cram so many questions in one email!
>
> Karen
> _________________________________________________________________
>
> l. Click here to learn how.
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org 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.
>



R-help_at_r-project.org 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. Received on Wed 12 Mar 2008 - 23:28:32 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 12 Mar 2008 - 23:30:22 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive