similar to: NA when using read.csv

Displaying 20 results from an estimated 30000 matches similar to: "NA when using read.csv"

2005 Aug 03
4
R CMD build error
Dear list, I try to update the prabclus package. R CMD check works nicely, no warnings, good results in all tests. However, building the package fails: ginkgo:/disk5/home/chrish/RAusw/libsrc R CMD build prabclus * checking for file 'prabclus/DESCRIPTION' ... OK * preparing 'prabclus': * checking whether 'INDEX' is up-to-date ... OK * removing junk files * building
2005 Aug 05
1
calculate likelihood based on logit regression
Hi, I just ran the following logit regression. But can anyone tell me how to calculate how much more likely males (Male=1) could show such symptom than females(Male=0)? I know it must be simple to get once I have the coefficients, but I just don't recall. Thank you very much! Call: glm(formula = Symptoms ~ 1 + Male, family = binomial(link = logit), data = HA) Deviance Residuals:
2005 Aug 08
1
Help with "non-integer #successes in a binomial glm"
Hi, I had a logit regression, but don't really know how to handle the "Warning message: non-integer #successes in a binomial glm! in: eval(expr, envir, enclos)" problem. I had the same logit regression without weights and it worked out without the warning, but I figured it makes more sense to add the weights. The weights sum up to one. Could anyone give me some hint? Thanks a lot!
2012 Feb 27
2
read.csv converts "NA" to missing values
Hello, I have a CSV file with region codes listed in a column. E.g. 'AS' for Asia, 'AU' for Australia and 'NA' North America. However, the data frame created using read.csv shows <NA> where the string variable should have had the value 'NA'. How can I input the value 'NA' present in a column in a CSV file without R changing it to missing? Thanks
2009 Feb 18
1
basic inquiry regarding write.csv
i have a loop which looks likes this: > data.info <- rbind(data.info, cbind(station.id, year, date, > max.discharge)) + y <- split(data.info, data.info[station.id]) + for (i in names(y)) {write.csv(y[[i]], file=paste(i, ".csv", sep=","))} i am wondering, where the file (which i am about to write in .csv format) will be saved? i looked at ?write.csv and
2012 Sep 05
2
using sqldf's read.csv.sql to read a file with "NA" for missing
I'm trying to use sqdf's function read.csv.sql to read CSV files in which the missing values are represented by NA's. Plain old read.csv works fine on these files, but they are rather large and I'd like to filter using sql-like statements. However, even if I specify field.types correctly and nrows=-1, it still turns the columns with NA's into chars or 0. I'm trying to make
2010 Jun 29
1
read.table / type.convert with NA values
Hello, While assisting a fellow R-helper off list, I narrowed down an issue he was having to the following behavior of type.convert, called through read.table. This is using R 2.10.1, if newer versions don't exhibit this behavior, apologies. # generates numeric vector > type.convert(c("123.42", "NA")) [1] 123.42 NA # generates a numeric vector, notice the
2008 Feb 12
3
regular expression for na.strings / read.table
Dear all, I am working with a csv file. Some data of the file are not valid and they are marked with a star '*'. For example : *789. I have attached with this email a example file (test.txt) that looks like the data I have to work with. I see 2 possibilities ..thast I cannot manage anyway in R: 1-first & easiest solution: Read the data with read.csv in R, and define as na strings
2005 Aug 05
1
question regarding logit regression using glm
I got the following warning messages when I did a binomial logit regression using glm(): Warning messages: 1: Algorithm did not converge in: glm.fit(x = X, y = Y, weights = weights, start = start, etastart = etastart, 2: fitted probabilities numerically 0 or 1 occurred in: glm.fit(x = X, y = Y, weights = weights, start = start, etastart = etastart, Can some one share your thoughts on how to
2009 Apr 29
2
reading csv file : blanks
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. Regards, Nataraju GM
2011 Apr 29
2
read.csv fails to read a CSV file from google docs
Hello all, I wish to use read.csv to read a google doc spreadsheet. I try using the following code: data_url <- " http://spreadsheets0.google.com/spreadsheet/pub?hl=en&hl=en&key=0AgMhDTVek_sDdGI2YzY2R1ZESDlmZS1VYUxvblQ0REE&single=true&gid=0&output=csv " read.csv(data_url) Which results in the following error: Error in file(file, "rt") : cannot open
2010 Oct 21
3
importing csv gets me all 16,000 columns with "NA"
I'm new to R. I have a mac (OS10.6). I have converted an Excel file to a csv to import into R. I have used many methods to import the file, most do not work, the best so far is: filename <- read.csv(/Users/Desktop/csvfile.csv", header=T, sep=","). I have also tried taking out the header and sep lines and it still imports fine. Regardless of what I do, it always brings in
2005 Oct 11
3
Reading # in file with read.csv
I'm using read.csv to read in a csv file containing '#' characters. For example, say I'm reading the following file (test.csv): var1,var2,var3 a,b,c d,e#,f g,h,i It outputs: > read.csv("Raw Data\\test.csv") var1 var2 var3 1 a b c 2 d e 3 g h i Warning message: incomplete final line found by readTableHeader on 'Raw Data\test.csv'
2009 Mar 13
2
different outcomes using read.table vs read.csv
Good Afternoon I have noticed results similar to the following several times as I have used R over the past several years. My .csv file has a header row and 3073 rows of data. > rskreg<-read.table('D:/data/riskregions.csv',header=T,sep=",") > dim(rskreg) [1] 2722 13 > rskreg<-read.csv('D:/data/riskregions.csv',header=T) > dim(rskreg) [1] 3073
2011 Jan 13
1
Unexpected behaviour of write.csv - read.csv
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Assuming the following: > x <- data.frame(a=1:10, b=runif(10)) > str(x) 'data.frame': 10 obs. of 2 variables: $ a: int 1 2 3 4 5 6 7 8 9 10 $ b: num 0.692 0.325 0.634 0.16 0.873 ... > write.csv(x, "x.csv") > x2 <- read.csv("x.csv") > str(x2) 'data.frame': 10 obs. of 3 variables: $ X:
2009 May 11
2
Read many .csv files into an R session automatically, without specifying filenames
Hi R-helpers, I would like to read into R all the .csv files that are in my working directory, without having to use a read.csv statement for each file. Each .csv would be read into a separate dataframe which would acquire the filename of the .csv. As an example: Mark<-read.csv("Mark.csv") ...but the code (or command) would do this automatically for every .csv in the working
2008 Apr 08
1
Combining many csv files into one and adding a column with an id of each csv file read
Dear R experts, I have been looking into the help-pages and old questions from the R-Help site, but the options offered there don't seem to work in my case. First of all, I am working on Windows XP, using R version 2.6.2. I am attaching two csv files as an example of how the data I am traying to put together is delivered to us. On the first row of every csv file is the name of the
2012 Jul 27
2
How can I access the title of a table read via read.csv?
Hi, I have a table which I can read via read.csv: fx1<-read.csv(file="A_FX_M.csv", header=TRUE) TIME REER NTD JPY GBP HKD 1 198001 124.26 36.030 237.96 2.263980 4.8366 2 198002 126.59 36.030 244.05 2.290426 4.8765 3 198003 128.33 36.026 248.62 2.206045 4.9960 4 198004 127.85 36.063 251.67 2.215330 4.9760 5 198005 124.40 36.050 228.35 2.302026 4.8891 6 198006
2012 Nov 23
3
read.csv.sql() to select from a large csv file
Dear list,   Dear list, I am using read.csv.sql() from the sqldf package to read individual-based data from a csv file that is too large for R. My original file contains a column called “ID” that identifies the individual. I would like to read in data for only one individual at a time, for example "Bobby". read.csv.sql("filename",sql = 'select * from file where ID =
2005 Aug 24
1
Panel regression in R
I am currently trying to replicate the results I got from RATS for a panel regression. The codes in RATS looks like this: * Final equation for Office Cap Rate Spread * Regression, Panel Data preg(effects=time, method=random) CapRate # CapRate{1} RentCycle{1} VacancyChangeYTY InflationYTY RealGDPyty Just wonder what R package also allow me to have the options like (effects=time, method=random).