Displaying 20 results from an estimated 156 matches for "csv2".
Did you mean:
csv
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 question, how can I wri...
2011 Nov 24
0
R-2.14.0: read.csv2 with fileEncoding="UTF-8"
...1252 LC_CTYPE=German_Germany.1252
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C
[5] LC_TIME=German_Germany.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
running under Windows Server 2008.
### RESULT:
> read.csv2("example.utf", fileEncoding="UTF-8")
VARIABLE LABEL ORDER_IN_PROFILE
1 A Umlauts:??? 45
2 B Umlauts:???? 35
>
#####################################################################
The exact same command executed under R-2....
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 1993 78 78 12
7 1994 78 78 12
How do I get :
------------------------
aa bb cc
1988 12 12 12
1989 78 78 12
1990 78 78 1...
2008 Dec 15
0
mixed csv and csv2
...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 my analysis I decided to work with data.frames. Maybe this was the first
error of mine. (Any other suggestions?)
I want the following: Go through a folder, load all the data available (if
relevant input is in th...
2002 May 17
2
read.table
Hi,
I have a data file with columns separated by ";" I read this file
without any problem using read.csv2( ) but I had problems trying to read
it with read.table( ... sep=";"). So it is not a problem for me, but I
wonder if there is a bug here.
drt <- read.csv2("t.txt", header=TRUE) # ok
dcs <- read.table("t.txt", header=TRUE, sep=";") # wro...
2011 Oct 22
1
cycling through a long list of files and names
...x64
Dear list,
Excuse my ignorance, but I have gone through the R help (?parse, ?eval,
etc.) and still really don't know how to do the following.
I have the general following structure that I would like to automate
[edited to make it shorter]:
>>>
city1997 <- dataCleaning(read.csv2("C:\\city\\year1997.txt"))
city1997 <- wasteCalculations(city1997, year = 1997)
if (city1997[1,1] == "Time") {city1997 <- timeCalculations(city1997)}
city1998 <- dataCleaning(read.csv2("C:\\city\\year1998.txt"))
city1998 <- wasteCalculations(city1998, year...
2001 Apr 06
2
automatic levels
Hello,
I've imported a csv, semi-colon spearated file with read.csv2,
containing one column of rownames and one column of floating point
numbers. When I look at the column of data with framename$columnname, I
get the values of the column plus level values. Are these level values
created automatically ?
The problem is when I try to calcluate the correlation coefficie...
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.
https://dl.dropbox.com/u/95607996/Specimen_RawData_1.csv
The file is encoded in ANSI, I tried also...
2009 Aug 10
3
how use cat() function?
...le 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 <- 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
> No_GWPMax <- nrow(data1)-nro...
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 <- n...
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
Einstellungen\\Cheba\\Desktop\\Rtemp\\ Results2010.xls",header = TRUE)
Warnmeldung:
In read.table(file = file, header = header, sep = sep, quote = quote, :
unvollständige letzte Zeile von readTable...
2009 Nov 02
1
two small wishes (with code sugegstions) for R-core
...pers,
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 will return a different class than SomeClass when subsetting with [.SomeClass
# and still need to keep the AsIs property
# Examples for classes returning different classes on subscipting are in packages 'bit', &...
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 this L[c(1,2,5)] it is not work coluns not define!!!!...
2006 Aug 03
2
efficient way to make NAs of empty cells in a factor (or character)
Dear all,
I have some csv-files (originating from Excel-files) containing empty
cells. In my example file I have four variables of different classes,
each with some empty cells in the original csv-file:
> test <- read.csv2("test.csv", dec=".")
> test
id id2 x y
1 a 1 NA
2 b e NA 2.2
3 f 3 3.3
4 c g 4 4.4
> class(test$id)
[1] "factor"
> class(test$id2)
[1] "factor"
> class(test$x)
[1] "integer"
> class(test$y)
[1] "n...
2009 Aug 18
1
create a table in the console!!
HI
I want to do a table with R (in the console)
GWP_Max NumberOfPolicies
No_GWPMax 8
[0-1000] 4
[1000-3000] 3
[> 3000] 5
i begin by calculate the number of policies in each class :
Data1 <- read.csv2("c:/Total1.csv", sep=",")
> Data2 <- read.csv2("c:/GWPMax1.csv",sep=",")[1:20,1:2]
> M <- merge(Data1,Data2, by.x = "Policy.Number",by.y = "Policy.Number",all.x = TRUE,all.y = TRUE )
> (No_GWPMax<-nrow(M[M[,25]=="NA&...
2009 Sep 23
1
Variable as a filename
...h 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", nrows=10)
}
As you see, file name has to change when I read a year, in other words, if a read 2004 in variable year, I need to select file 2004. Then I read 2005 in variable year, and then I R have to open file 2005,...That's my question, How can I write the order r...
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 =
stringsAsFactors)) :
second argument must be a list
It's the same when I use write.csv instead of write.csv2
summary() produces a very simple table:
structure(c(7.803, 9.633, 10.15,...
2005 Aug 15
2
Shutdown by to much data (PR#8065)
Full_Name: Jan Bentlage
Version: 2.1.1
OS: Windows
Submission from: (NULL) (212.62.93.226)
I loaded a huge database (textfile, semikolon seperated) by read.csv2. The data
already appeared in the list (by ls()). When I want to view the data in the
editor, R completly crashes.
2017 Jul 10
1
PAM Clustering
...n i ran R script i am getting this error:*
*Error in pam(d, 10) : x is not a numeric dataframe or matrix.*
*Execution halted*
How can i fix this error?
Thanks in advance.
?
data.csv
<https://drive.google.com/file/d/0B4rY6f4kvHeCcVpLRTQ5VDhDNUk/view?usp=drive_web>
?
*pam.R*
data <- read.csv2("data.csv")
attach(data)
d=as.matrix(data)
library(cluster)
cluster.pam = pam(d,10)
table(cluster.pam$clustering)
filenameclu = paste("clusters", ".txt")
write.table(cluster.pam$clustering, file=filenameclu,sep=",")
[[alternative HTML version deleted]]
2009 Aug 18
1
Tr : create a table in the console!!
...Envoyé le : Mardi, 18 Août 2009, 16h26mn 20s
Objet : create a table in the console!!
HI
I want to do a table with R (in the console)
GWP_Max NumberOfPolicies
No_GWPMax 8
[0-1000] 4
[1000-3000] 3
[> 3000] 5
i begin by calculate the number of policies in each class :
Data1 <- read.csv2("c:/Total1.csv", sep=",")
> Data2 <- read.csv2("c:/GWPMax1.csv",sep=",")[1:20,1:2]
> M <- merge(Data1,Data2, by.x = "Policy.Number",by.y = "Policy.Number",all.x = TRUE,all.y = TRUE )
> (No_GWPMax<-nrow(M[M[,25]=="NA&...