inputting data in R
1
0
Entering edit mode
Guest User ★ 13k
@guest-user-4897
Last seen 9.7 years ago
ID_REF GSM133971 GSM133972 GSM133973 244901_at 5.95461158752441E+001 1.88836498260498E+001 1.98215045928955E+001 244902_at 7.25400314331055E+001 2.65250205993652E+001 1.95321922302246E+001 244903_at 2.23291015625000E+002 1.78133636474609E+002 5.38166885375977E+001 244904_at 3.65505447387695E+001 3.04016351699829E+000 6.80462265014648E+000 244905_at 4.07523269653320E+001 2.58869285583496E+001 1.18088026046753E+001 244906_at 1.50184860229492E+002 5.39840278625488E+001 4.14917945861816E+001 244907_at 2.65190029144287E+001 1.39808797836304E+000 2.08662915229797E+000 244908_at 3.50156021118164E+000 1.05003893375397E+000 4.57657009363174E-001 244909_at 1.02663551330566E+002 1.42618169784546E+001 1.61735534667969E+001 244910_s_at 7.20161895751953E+001 1.57578134536743E+001 1.31729679107666E+001 244911_at 3.26349411010742E+001 7.23858451843262E+000 6.47778940200806E+000 The above is the MAS5.0 normalized data and I need to read the data in R but getthe following error: mydat=read.csv("trans.csv",header=T) Error in make.names(col.names, unique = TRUE) :invalid multibyte string at '<ff>< -- output of sessionInfo(): I tried doing the following : de=read.table(textConnection(" ID_REF GSM133971 GSM133972 GSM133973 + 244901_at 5.95461158752441E+001 1.88836498260498E+001 1.98215045928955E+001 + 244902_at 7.25400314331055E+001 2.65250205993652E+001 1.95321922302246E+001 + 244903_at 2.23291015625000E+002 1.78133636474609E+002 5.38166885375977E+001 + 244904_at 3.65505447387695E+001 3.04016351699829E+000 6.80462265014648E+000 + 244905_at 4.07523269653320E+001 2.58869285583496E+001 1.18088026046753E+001 + 244906_at 1.50184860229492E+002 5.39840278625488E+001 4.14917945861816E+001 + 244907_at 2.65190029144287E+001 1.39808797836304E+000 2.08662915229797E+000 + 244908_at 3.50156021118164E+000 1.05003893375397E+000 4.57657009363174E-001 + 244909_at 1.02663551330566E+002 1.42618169784546E+001 1.61735534667969E+001 + 244910_s_at 7.20161895751953E+001 1.57578134536743E+001 1.31729679107666E+001 + 244911_at 3.26349411010742E+001 7.23858451843262E+000 6.47778940200806E+000"),header = TRUE,as.is= TRUE,sep = ',') str(de) 'data.frame': 11 obs. of 1 variable: $ ID_REF...........GSM133971..........GSM133972...............GSM133973: chr "244901_at 5.95461158752441E+001 1.88836498260498E+001 1.98215045928955E+001" "244902_at 7.25400314331055E+001 2.65250205993652E+001 1.95321922302246E+001" "244903_at 2.23291015625000E+002 1.78133636474609E+002 5.38166885375977E+001" "244904_at 3.65505447387695E+001 3.04016351699829E+000 6.80462265014648E+000" ... But when I try doing for the whole dataset I get an error: de=read.table(textConnection("trans.csv"),header = TRUE,as.is= TRUE,sep = ',') de [1] trans.csv <0 rows> (or 0-length row.names) -- Sent via the guest posting facility at bioconductor.org.
• 1.3k views
ADD COMMENT
0
Entering edit mode
@sean-davis-490
Last seen 4 months ago
United States
On Wed, Oct 24, 2012 at 2:51 AM, priya [guest] <guest@bioconductor.org>wrote: > > ID_REF GSM133971 GSM133972 GSM133973 > 244901_at 5.95461158752441E+001 1.88836498260498E+001 > 1.98215045928955E+001 > 244902_at 7.25400314331055E+001 2.65250205993652E+001 > 1.95321922302246E+001 > 244903_at 2.23291015625000E+002 1.78133636474609E+002 > 5.38166885375977E+001 > 244904_at 3.65505447387695E+001 3.04016351699829E+000 > 6.80462265014648E+000 > 244905_at 4.07523269653320E+001 2.58869285583496E+001 > 1.18088026046753E+001 > 244906_at 1.50184860229492E+002 5.39840278625488E+001 > 4.14917945861816E+001 > 244907_at 2.65190029144287E+001 1.39808797836304E+000 > 2.08662915229797E+000 > 244908_at 3.50156021118164E+000 1.05003893375397E+000 > 4.57657009363174E-001 > 244909_at 1.02663551330566E+002 1.42618169784546E+001 > 1.61735534667969E+001 > 244910_s_at 7.20161895751953E+001 1.57578134536743E+001 > 1.31729679107666E+001 > 244911_at 3.26349411010742E+001 7.23858451843262E+000 > 6.47778940200806E+000 > > > The above is the MAS5.0 normalized data and I need to read the data in R > but getthe following error: > > mydat=read.csv("trans.csv",header=T) > Error in make.names(col.names, unique = TRUE) :invalid multibyte string > at '<ff>< > > Hello. I assume you have read the R Input/Output manual here: http://cran.r-project.org/doc/manuals/ The function read.csv is for reading comma-separated-values. Your data look to be tab-separated? Try using read.delim or read.table. Be sure to read the help page for ALL functions you try to use, even if you are following someone else's example. As an aside, when posting to the list, please include the output of sessionInfo() at least once in each email when you want help with something. It lets the rest of us know what version of R, what packages (and versions) you are using, language settings, etc. Sean > -- output of sessionInfo(): > > I tried doing the following : > > de=read.table(textConnection(" > ID_REF GSM133971 > GSM133972 GSM133973 > + 244901_at 5.95461158752441E+001 1.88836498260498E+001 > 1.98215045928955E+001 > + 244902_at 7.25400314331055E+001 2.65250205993652E+001 > 1.95321922302246E+001 > + 244903_at 2.23291015625000E+002 1.78133636474609E+002 > 5.38166885375977E+001 > + 244904_at 3.65505447387695E+001 3.04016351699829E+000 > 6.80462265014648E+000 > + 244905_at 4.07523269653320E+001 2.58869285583496E+001 > 1.18088026046753E+001 > + 244906_at 1.50184860229492E+002 5.39840278625488E+001 > 4.14917945861816E+001 > + 244907_at 2.65190029144287E+001 1.39808797836304E+000 > 2.08662915229797E+000 > + 244908_at 3.50156021118164E+000 1.05003893375397E+000 > 4.57657009363174E-001 > + 244909_at 1.02663551330566E+002 1.42618169784546E+001 > 1.61735534667969E+001 > + 244910_s_at 7.20161895751953E+001 1.57578134536743E+001 > 1.31729679107666E+001 > + 244911_at 3.26349411010742E+001 7.23858451843262E+000 > 6.47778940200806E+000"),header = TRUE,as.is= TRUE,sep = ',') > > > str(de) > 'data.frame': 11 obs. of 1 variable: > $ ID_REF...........GSM133971..........GSM133972...............GSM133973: > chr "244901_at 5.95461158752441E+001 1.88836498260498E+001 > 1.98215045928955E+001" "244902_at 7.25400314331055E+001 > 2.65250205993652E+001 1.95321922302246E+001" "244903_at > 2.23291015625000E+002 1.78133636474609E+002 5.38166885375977E+001" > "244904_at 3.65505447387695E+001 3.04016351699829E+000 > 6.80462265014648E+000" ... > > > > But when I try doing for the whole dataset I get an error: > > de=read.table(textConnection("trans.csv"),header = TRUE,as.is= TRUE,sep = > ',') > > de > > [1] trans.csv > <0 rows> (or 0-length row.names) > > -- > Sent via the guest posting facility at bioconductor.org. > > _______________________________________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD COMMENT

Login before adding your answer.

Traffic: 796 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6