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

From: David Winsemius <dwinsemius_at_comcast.net>
Date: Thu, 13 Mar 2008 13:33:01 +0000 (UTC)

Chang Liu <changisme_at_hotmail.com> wrote in news:BAY144-W56113AA5B8B59D44C17F37BE080_at_phx.gbl:

> 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?
>

You have not given reproducible code, so it is difficult to know why that does not succeed. I have a data.frame with a similar name left over from another problem. When I enter DATA$V1[1] = -.5 , it has the desired effect. Although it is not the source of the error, you should learn to use "<-" rather than "=". You should also learn to post questions with reproducible code.

-- 
David Winsemius

______________________________________________
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 Thu 13 Mar 2008 - 13:48:28 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 Thu 13 Mar 2008 - 14:00: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