Re: [R] import .csv file into R

2012-02-24 Thread Marion Wenty
Hi Michael, thanks a lot for the additional tips! So far it all has worked! Marion 2012/2/17 Marion Wenty > Hi Michael and Rui, > > thanks a lot for the tips. > > It worked with both your suggestions! > > I also found out, that this problem only exists if I put header=T. > > Thanks again! > > Ma

Re: [R] import .csv file into R

2012-02-17 Thread Marion Wenty
Hi Michael and Rui, thanks a lot for the tips. It worked with both your suggestions! I also found out, that this problem only exists if I put header=T. Thanks again! Marion If you don't need to refer to colnames you should be fine. If you do need to subset by colnames, you can still do it w

Re: [R] import .csv file into R

2012-02-16 Thread Rui Barradas
Hello, > I read a .csv file into R > > with the following command: > > A<-read.csv2(file="Mappe3.csv") > > It worked fine, except that I would like to get rid of the points between > the words and get spaces instead like I have got in the .csv file. Try gsub('\\.', ' ', A) (And see ?regexp

Re: [R] import .csv file into R

2012-02-16 Thread R. Michael Weylandt
If you don't need to refer to colnames you should be fine. If you do need to subset by colnames, you can still do it with `[`, but you'll have trouble if you want to use the $ trick, unless you use back-ticks. Don't worry about these things if they aren't troubling you now though. Michael On Thu

Re: [R] import .csv file into R

2012-02-16 Thread Marion Wenty
David, thanks for the tips, though, I tried these arguments but it didn' work. Michael, thanks for your advice which worked, so far. I am using my object to create a barplot afterwards, which automatically puts the colnames besides the bars. Maybe this is still a good solution for my purpose as I

Re: [R] import .csv file into R

2012-02-16 Thread R. Michael Weylandt
check.names=FALSE but it's discouraged because it will make it hard to refer to column names inside R. Michael On Thu, Feb 16, 2012 at 11:18 AM, Marion Wenty wrote: > Dear r-helpers, > > I read  a .csv file into R > > with the following command: > > A<-read.csv2(file="Mappe3.csv") > > It worked

[R] import .csv file into R

2012-02-16 Thread Marion Wenty
Dear r-helpers, I read a .csv file into R with the following command: A<-read.csv2(file="Mappe3.csv") It worked fine, except that I would like to get rid of the points between the words and get spaces instead like I have got in the .csv file. At the moment it looks like the following: habe.m

Re: [R] import csv file into R, strange problem

2011-09-15 Thread bby2103
Thanks for all the input. You were right. It was not csv file in the correct format. As it turned out, it's not a R problem, more a MAC problem. For some reason, my MAC doesn't correctly download csv file from internet, which caused all the subsequent problems. I will have to take it to a m

Re: [R] import csv file into R, strange problem

2011-09-14 Thread Rainer M Krug
On Wed 14 Sep 2011 10:37:46 CEST, Uwe Ligges wrote: > > > On 14.09.2011 10:28, Rainer M Krug wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> On 13/09/11 18:08, bonnieyuan wrote: >>> Hi, I used read.csv(file name, header=T, sep=",") to bring in a csv >>> file I saved in MS Excel. Th

Re: [R] import csv file into R, strange problem

2011-09-14 Thread Uwe Ligges
On 14.09.2011 10:28, Rainer M Krug wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 13/09/11 18:08, bonnieyuan wrote: Hi, I used read.csv(file name, header=T, sep=",") to bring in a csv file I saved in MS Excel. The strange thing is all the data ended up in one big column. The number o

Re: [R] import csv file into R, strange problem

2011-09-14 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 13/09/11 18:08, bonnieyuan wrote: > Hi, I used read.csv(file name, header=T, sep=",") to bring in a csv > file I saved in MS Excel. The strange thing is all the data ended > up in one big column. The number of rows match with the number of > observa

Re: [R] import csv file into R, strange problem

2011-09-13 Thread David Winsemius
AM To: r-help@r-project.org Subject: [R] import csv file into R, strange problem Hi, I used read.csv(file name, header=T, sep=",") to bring in a csv file I saved in MS Excel. The strange thing is all the data ended up in one big column. The number of rows match with the number of obser

Re: [R] import csv file into R, strange problem

2011-09-13 Thread Greg Snow
[mailto:r-help-boun...@r-project.org] On Behalf Of bonnieyuan Sent: Tuesday, September 13, 2011 10:09 AM To: r-help@r-project.org Subject: [R] import csv file into R, strange problem Hi, I used read.csv(file name, header=T, sep=",") to bring in a csv file I saved in MS Excel. The stra

[R] import csv file into R, strange problem

2011-09-13 Thread bonnieyuan
Hi, I used read.csv(file name, header=T, sep=",") to bring in a csv file I saved in MS Excel. The strange thing is all the data ended up in one big column. The number of rows match with the number of observations, but all the variables got squeezed into one column. Also the first row where the head