Re: [R] How to replace numeric value in the column contains Text (Factor)?

2018-04-18 Thread Marna Wagley
> David L Carlson > Department of Anthropology > Texas A&M University > College Station, TX 77843-4352 > > -Original Message- > From: R-help On Behalf Of Marna Wagley > Sent: Wednesday, April 18, 2018 12:56 PM > To: r-help mailing list > Subject:

Re: [R] How to replace numeric value in the column contains Text (Factor)?

2018-04-18 Thread David L Carlson
ent of Anthropology Texas A&M University College Station, TX 77843-4352 -----Original Message- From: R-help On Behalf Of Marna Wagley Sent: Wednesday, April 18, 2018 12:56 PM To: r-help mailing list Subject: [R] How to replace numeric value in the column contains Text (Factor)? Hi R user, W

Re: [R] How to replace numeric value in the column contains Text (Factor)?

2018-04-18 Thread Jeff Newmiller
I would recommend that you avoid converting (or letting R convert for you) your textual data values into factors until you have finished doing this kind of modification. You can restore the column to character data type either re-reading it with the stringsAsFactors=FALSE option to read.table/r

[R] How to replace numeric value in the column contains Text (Factor)?

2018-04-18 Thread Marna Wagley
Hi R user, Would you mind to help me on how I can change a value in a specific column and row in a big table? but the column of the table is a factor (not numeric). Here is an example. I want to change dat[4:5,3]<-"20" but it generated NA> do you have any suggestions for me? dat<-structure(list(Si