similar to: Avoiding "." when importing from csv

Displaying 20 results from an estimated 30000 matches similar to: "Avoiding "." when importing from csv"

2007 Oct 17
2
Problems with paste and blank
Hi there, I've got the following problem under Windows XP, R 2.5.1: When I'm pasting some objects: Stadtwerksname<-"Mannheim" Laufwerk<-"C:\\" paste(Laufwerk,Stadtwerksname,".csv") I get the result: [1] "C:\\ Mannheim .csv" The problem's are the superfluous gaps/blanks between the three parts. Is there a way to get rid off this
2012 Oct 12
2
Problem to read non-standard csv file
Hi all, I have a problem to read csv file with comma as decimal. The numbers were readed as strings. I used the following string in R, but I do not understand why it does not work. tab <- read.csv2("Specimen_RawData_1.csv", header = TRUE, sep = ";", dec = ",", nrows = -1) In addition, I copy/past into the post the link to the csv file generated by my instrument.
2012 Feb 16
2
import .csv file into R
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.mich.gut.mit.KlassenkollegInnen.verstanden hatte.gutes.Verhältnis.zu.Eltern
2010 Mar 22
1
Error while trying to save summary() output as csv
Hi, I need to save output of summary() procedure to a csv file. It's all OK when it's applied to a 'factor' class variable, but when I try to save a 'integer' class summary to csv it gives me : > summary(rnorm(100, 10)) -> object > write.csv2(object, file='name.csv') Error in do.call("expand.grid", c(dimnames(x), stringsAsFactors =
2009 Jan 14
1
Adressing list-elements
Dear all, I'm using R 2.8.1 under Vista. I programmed a Simulation with the code enclosed at the end of the eMail. After the simulation I want to analyse the columns of the single simulation-runs, i.e. e.g. Simulation[[1]][,1] sth. like that but I cannot address these columns... Can anybody please help? Best, Thomas ############################ CODE ############################
2007 Dec 28
1
Forcing "virtual" digits
Hi there, I'm using XP with R 2.6.1 I've got the following question: Is there a way to force "virtual" digits? I mean: In the external csv-file, I read in some numbers, e.g. "33" which is written into a variable. I want to add this variable into a plot with an additional digit: "33.0". I know, that this is a kind of cheating, because the
2009 Sep 30
1
Read header csv file
Hi R community, First of all, I want to thank everybody to share their time solving R questions, You are great. Ok, for my questions, I've been looking for a solutions by myself, in forums but I'm just a little bit desesperate so I hope somebody can help me. I have built a code to read files from a directory. These files are named by a year (2004.csv, 2005.csv,...). When the code reads
2005 Jun 29
2
write.csv suggestion
Hello all, I had some trouble recently with write.csv because I couldn't change one of the default options. A quick view of the code showed that the function was not defined in the most optimal way. Currently, write.csv <- function (..., col.names = NA, sep = ",", qmethod = "double") write.table(..., col.names = NA, sep = ",", qmethod = "double")
2009 Aug 06
2
problem with r import data
Good moorning, yesterday, i asked for how we can import data into R i found that it is necessary to make the file in csv format then use L<- read.csv2("path of file") now i see that the dimension of my table importing into R is 1 colonne (i have realy 20) and (655555) the number of all my lines in the excel file (i want to have only the 2600 lines in my table) Also, when i say to do
2010 Apr 23
2
read.csv data frame thousands separator
Dear group, Here is my df, trades1 : trades1 <- structure(list(Instrument.Long.Name = c("CORN", "CORN", "CORN", "CORN", "CORN", "SOYBEANS", "SOYBEANS", "SOYBEANS", "SOYBEANS", "SOYBEANS", "SOYBEANS", "STANDARD LEAD USD", "STANDARD LEAD USD", "SPCL
2005 Jun 17
2
reading csv-data
Hi! I have had this problem for a long time. I have tried to study the manuals and search the mailing lists, but I can not solve this. I think there has to be one simple solution to this, but I just can not find it. I have saved the data in excel (csv-format). Then I read the data in R e.g. >data <- read.csv2("example.csv", header=TRUE) I look the data and it looks ok. E.g
2005 Nov 17
1
Help with read.csv2
Hello, I am importing the following file ;aa;bb;cc 1988;12;12;12 1989;78;78;12 1990;78;78;12 1991;78;78;12 1992;78;78;12 1993;78;78;12 1994;78;78;12 ------------------------------------------------ data<-read.csv2("test.csv",header=T) ------------------------------------------ it gives X aa bb cc 1 1988 12 12 12 2 1989 78 78 12 3 1990 78 78 12 4 1991 78 78 12 5 1992 78 78 12 6
2008 Dec 15
0
mixed csv and csv2
Dear all, I have a huge problem after downloading and exporting data from Reuters3000 XTra: I downloaded many many monthly, quarterly and yearly data. I do not know why, but after saving, I have mixed-data sets, i.e. files which can be imported as “read.csv” and others that are in the format of “read.csv2”. Sure I could change them, but normally it should be possible to mix them… For
2009 Nov 02
1
two small wishes (with code sugegstions) for R-core
Dear R developers, It would be great if you could implement the two minor code changes suggested below, which would help processing large objects in R. Jens Oehlschl?gel # Wish no. 1: let [.AsIs return the class AFTER subsetting, not the class of the original object # Wish no. 2: adjust write.csv and write.csv2 for multiple calls in chunked writing # Rationale no. 1: a couple of packages
2009 Aug 10
3
how use cat() function?
i  want to print in the console and to have an excel file like this no_GWP                NbOfPolicyClass1[0-1000]     NbOfPolicyClass2[1000-3000]        NbOfPolicyClass3[> 3000] No_GWPMax=8    NbpolicyClass1=5                   NbpolicyClass2=4                            NbpolicyClass3 =3              i have do it like this:!!! data1 <-
2009 Aug 10
2
(sans objet)
i have written this in R, > data1 <- read.csv2("c:/Total1.csv",sep=",") > data2 <- read.csv2("c:/GWPMax1.csv",sep=",") > M <- merge(data1, data2, by.x = "Policy.Number", by.y = "Policy.Number") > nrow(data1) [1] 20 > nrow(M) [1] 12 > NbOfPolicyWithoutGWPMax <- nrow(data1)-nrow(M) >
2006 Dec 07
1
Simulation in R - Part 2
Hello! So, the simulation works (drawing 100 samples and then calculate the model for each sample). Here is the code: --snip-- # sample size n=200 ergebnisse200 <- rep(0, each=100) stichproben200 <- vector(?list?, 100) default200 <- rep(0, each=100) for (i in seq(1:100)) { n <- dim(daten)[1] ix <- sample(n,200) samp_i <- daten[ix,] # draw samples y <- sum(samp_i$y)
2009 Jun 18
3
Questíon regarding the use of write.csv2, write.table ...
Hi all, I use "write.csv" and "write.table" to write a data frame in a file like following: write.csv2(allRandomTestCase_XDroped, "allRandomTestCase.csv") But in the created file "allRandomTestCase.csv" an additional column with consecutive numbers is automatically added to the column of the data frame "allRandomTestCase_XDroped". That is why my
2010 Apr 01
3
reading excel into R
Dear all, I am new R user and I am sure that this question has been asked quite often and I have also googled it and read about it! I understood that in order to read excel sheet into R you need to open it and saved it as csv or text, is this true? or you can use read.delim2 and read.csv2 to do this without the following error > dat <- read.csv2(file="C:\\Dokumente und
2009 Sep 23
1
Variable as a filename
Hi R community, I have a question. I have 5 files in a directory. Each file has a year as a name (file 1 ->2004, file 2-> 2005, ...). I want to build a for loop where I call first file, do some calculations, go to second file, do some calculations, etc. Somethin like this: year<-2003 nfiles <- length(dir()) for( year in 2003:nfiles) {clima<-read.csv2([year]".csv",