Read yesterday's and today's archives.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Fri, Jun 24, 2016 at 1:55 PM, Steven Yen wrote:
> I read
I read a csv file (with read.csv) containing missing values (as shown
below). Is there a convenient way to set these NA into zeros?
Better yet, is there an option to assign zeros to these blank cells in
reading the csv file? Thank you!
NA -1 NA NA NA 1 NA
NA NA NA NA NA NA NA
NA NA
However, be careful, because .Rprofile runs before any saved .RData file
is loaded. If the object you created in .Rprofile is later saved when you
quit R, then the next time you start R, the saved version will replace the
version created in .Rprofile. (Unless you start R using R --no-restore)
This
Hi Greg,
Thanks for your prompt reply. I have added 'library(utils)' in my
Rprofile file and now it is working fine.
Thanks and regards,
On Mon, Jun 23, 2014 at 11:34 PM, Greg Snow <538...@gmail.com> wrote:
> The .Rprofile file is processed before all the standard packages are
> loaded, that is
The .Rprofile file is processed before all the standard packages are
loaded, that is why you are seeing the error. If you instead run the
command as utils::read.csv or use library or require to manually load
the utils package before calling read.csv then everything should work
for you.
On Mon, Ju
Hi again,
I am trying to build a procedure such that whenever R starts, it will
read some CSV file.
Therefore I put a code sometime like 'read.csv(...)' in my Rprofile
file. However if I put this function there then I am getting an error
saying 'Error: could not find function "read.csv"', wheneve
Dear Gafar Matanmi Oyeyemi,
Re:
> I am trying to read a csv file using the code;
> contol <- read.csv("RBS.csv")
> This is the error message I got;
> Error in file(file, "r") : unable to open connection
> In addition: Warning message:
> In file(file, "r") :
> cannot open file 'RBS.csv', reason '
Are you sure the file is in your current working directory? Often people
simply put the full path such as "/Users/Name/RBS.csv"
Cheers,
On Fri, Apr 19, 2013 at 9:30 AM, Gafar Matanmi Oyeyemi
wrote:
> I am trying to read a csv file using the code;
> contol <- read.csv("RBS.csv")
> This is the e
Make sure you have the correct path to the file.
On Apr 19, 2013 10:53 AM, "Gafar Matanmi Oyeyemi"
wrote:
> I am trying to read a csv file using the code;
> contol <- read.csv("RBS.csv")
> This is the error message I got;
> Error in file(file, "r") : unable to open connection
> In addition: Warni
I am trying to read a csv file using the code;
contol <- read.csv("RBS.csv")
This is the error message I got;
Error in file(file, "r") : unable to open connection
In addition: Warning message:
In file(file, "r") :
cannot open file 'RBS.csv', reason 'No such file or directory'
Where was the mistak
When you read in a .csv file with some empty cells using read.csv,
there is no need to specify anything - empty cells will be recorded as
NAs automatically:
try:
data1<-read.csv("oa_2006.csv")
Dimitri
On Wed, Apr 29, 2009 at 7:54 AM, Jim Lemon wrote:
> Nattu wrote:
>>
>> Hi,
>>
>> I have a co
Nattu wrote:
Hi,
I have a comma seperated data file which has blanks in it. I am trinying to
import it to R using
data1<-read.csv("oa_2006.csv", header = TRUE, sep = ",", quote="\"",
dec=".")
I want the missing values to be "NA". instead R reads them as "U". Any idea
why this happens ?
Hi
Hi,
I have a comma seperated data file which has blanks in it. I am trinying to
import it to R using
data1<-read.csv("oa_2006.csv", header = TRUE, sep = ",", quote="\"",
dec=".")
I want the missing values to be "NA". instead R reads them as "U". Any idea
why this happens ?
Thanks in advance.
R
on 07/02/2008 01:55 PM Viswanathan Shankar wrote:
Hello ,
I am having some difficulty reading a CSV file of unequal record length
in R . The data has 26 columns and do not have header and is generated
from a R syntax -
write.table(schat,"schat.csv", sep=",", col.names=FALSE, append = TRUE)
Viswanathan Shankar wrote:
Hello ,
I am having some difficulty reading a CSV file of unequal record
length in R . The data has 26 columns and do not have header and is
generated from a R syntax -
write.table(schat,"schat.csv", sep=",", col.names=FALSE, append = TRUE)
1.0,1.0,0.0,0.1,0.1,0.1
Hello ,
I am having some difficulty reading a CSV file of unequal record length
in R . The data has 26 columns and do not have header and is generated
from a R syntax -
write.table(schat,"schat.csv", sep=",", col.names=FALSE, append = TRUE)
1.0,1.0,0.0,0.1,0.1,0.1,0.2,0.2,0.3,0.3,0.4,0.4,0.5
Just as an update on encoding (which may or may not be of interest). I
changed the read.csv command for three .csv files I was reading to specify
the encoding to be
encoding="CP1252"
and all 3 files were read in without problems on linux. Last night I
swapped the analysis back on to my windo
David Scott wrote:
> I am a total dunce when it comes to encodings though. How do you find the
> encoding of a file?
>
You don't. Either you know it, or you are up the proverbial creek (or
roof). The "8-bit ascii" encodings is one of the greater computer crimes
of the last century precisely b
On Wed, 23 Jan 2008, David Scott wrote:
> On Tue, 22 Jan 2008, Prof Brian Ripley wrote:
>
>> On Wed, 23 Jan 2008, David Scott wrote:
>>
>>>
>>> I have encountered a problem with reading a .csv file on a linux box. I
>>> can read the file on my windows machine (under XP) but on the linux box it
>
On Tue, 22 Jan 2008, Prof Brian Ripley wrote:
> On Wed, 23 Jan 2008, David Scott wrote:
>
>>
>> I have encountered a problem with reading a .csv file on a linux box. I
>> can read the file on my windows machine (under XP) but on the linux box it
>> gives :
>>
>>> patients <- read.csv("../Patient
On Wed, 23 Jan 2008, David Scott wrote:
>
> I have encountered a problem with reading a .csv file on a linux box. I
> can read the file on my windows machine (under XP) but on the linux box it
> gives :
>
>> patients <- read.csv("../Patients.csv", header = FALSE,
> + col.names
I have encountered a problem with reading a .csv file on a linux box. I
can read the file on my windows machine (under XP) but on the linux box it
gives :
> patients <- read.csv("../Patients.csv", header = FALSE,
+ col.names = patientsNames)
Error in type.convert(data[[i]],
22 matches
Mail list logo