Wrong csv data?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Wrong csv data?

Grigory Fateyev
Hello!

I have csv file (attached) with any data, where first column is time.
When I read into data.frame become temperature values. What it can be?

data <- read.csv("rp5_vladimir2010.csv", colClasses = "character", sep
= ";") names(data)
data$Time
data[,1]

--
Всего наилучшего!
greg [at] dobroe [dot] ru Григорий.

______________________________________________
[hidden email] 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 | Threaded
Open this post in threaded view
|

Re: Wrong csv data?

PIKAL Petr
Hi

Attachment did not went through. Can you show us result of dput(head(data)) or output from str(data)?

Anyway I wonder how time can became temperature. R is smart but I do not believe that during import it somehow gets a local temperature at given time and put it in your data.

Regards
Petr


> -----Original Message-----
> From: [hidden email] [mailto:r-help-bounces@r-
> project.org] On Behalf Of Grigory Fateyev
> Sent: Thursday, January 24, 2013 11:58 AM
> To: [hidden email]
> Subject: [R] Wrong csv data?
>
> Hello!
>
> I have csv file (attached) with any data, where first column is time.
> When I read into data.frame become temperature values. What it can be?
>
> data <- read.csv("rp5_vladimir2010.csv", colClasses = "character", sep
> = ";") names(data) data$Time data[,1]
>
> --
> Всего наилучшего!
> greg [at] dobroe [dot] ru Григорий.
______________________________________________
[hidden email] 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 | Threaded
Open this post in threaded view
|

Re: Wrong csv data?

Grigory Fateyev
Hello PIKAL Petr!
On Fri, 25 Jan 2013 10:09:54 +0000 you wrote:

> Hi
>
> Attachment did not went through. Can you show us result of
> dput(head(data)) or output from str(data)?
>
> Anyway I wonder how time can became temperature. R is smart but I do
> not believe that during import it somehow gets a local temperature at
> given time and put it in your data.

Thank you for the answer. The problem was solved just remove traling
";" at the end every row. Header line hasn't traling semicolon.

sed -e "s/;\r/\r/g" file.csv > file.csv_tmp

>
> Regards
> Petr
>
>
> > -----Original Message-----
> > From: [hidden email] [mailto:r-help-bounces@r-
> > project.org] On Behalf Of Grigory Fateyev
> > Sent: Thursday, January 24, 2013 11:58 AM
> > To: [hidden email]
> > Subject: [R] Wrong csv data?
> >
> > Hello!
> >
> > I have csv file (attached) with any data, where first column is
> > time. When I read into data.frame become temperature values. What
> > it can be?
> >
> > data <- read.csv("rp5_vladimir2010.csv", colClasses = "character",
> > sep = ";") names(data) data$Time data[,1]
> >
> > --
> > Всего наилучшего!
> > greg [at] dobroe [dot] ru Григорий.


--
Всего наилучшего!
greg [at] dobroe [dot] ru Григорий.

______________________________________________
[hidden email] 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.