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

2012/2/16 Rui Barradas <rui1...@sapo.pt>

> 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 ?regexpr and ?gsub)
>
> Rui Barradas
>
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/import-csv-file-into-R-tp4394533p4394573.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help@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.
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to