[R] Blanking out specific cells in a data frame
Sabatier, Jennifer F. (CDC/OID/NCHHSTP)
fvv9 at cdc.gov
Wed May 19 19:36:50 CEST 2010
Hi R-Help,
I am a new R user. I have used SAS for many years (just FYI on what I
am used to and possible obstacles it presents).
I have a data frame:
mydf <-data.frame(matrix(rnorm(102), ncol=6)
I would like to be able to delete ALL the information in column 6 for
rows 2 through r, where r=#rows.
How can I do that?
I want the resulting data frame to look like this:
X1 X2 X3 X4 X5 X6
Data data data data data data
Data data data data data
Data data data data data
Data data data data data
Data data data data data
Data data data data data
Data data data data data
Data data data data data
Data data data data data
Data data data data data
Data data data data data
Data data data data data
Data data data data data
Data data data data data
Data data data data data
Data data data data data
Data data data data data
(Sorry for using the word "data" and not having a cut and paste of my
actual data frame...the computer I am writing this email on does not
have R so I have to improvise.)
Thanks,
Jen
More information about the R-help
mailing list