similar to: read.table: skipping trailing delimiters

Displaying 20 results from an estimated 10000 matches similar to: "read.table: skipping trailing delimiters"

2013 Feb 20
2
duplicate 'row.names' are not allowed
I am getting an error when trying to import tab delimited .txt file saved from Excel. I have read what is posted on the forums but still am confused. I saved my Excel file (DataTestforR.xlsx) as a tab delimited txt file (DataTestR.txt) on my Desktop. In the RGUI, I tried to import the txt file and got an error > myfile<-"C:\\Users\\jpapa\\Desktop\\DataTestR.txt" >
2008 Oct 13
2
split data, but ensure each level of the factor is represented
Hello, I'll use part of the iris dataset for an example of what I want to do. > data(iris) > iris<-iris[1:10,1:4] > iris Sepal.Length Sepal.Width Petal.Length Petal.Width 1 5.1 3.5 1.4 0.2 2 4.9 3.0 1.4 0.2 3 4.7 3.2 1.3 0.2 4 4.6 3.1 1.5
2010 Jun 09
4
question about "mean"
Hi there: I have a question about generating mean value of a data.frame. Take iris data for example, if I have a data.frame looking like the following: --------------------- Sepal.Length Sepal.Width Petal.Length Petal.Width Species 1 5.1 3.5 1.4 0.2 setosa 2 4.9 3.0 1.4 0.2
2018 Jan 28
2
Newbie wants to compare 2 huge RDSs row by row.
The anti_join from the package dplyr might also be handy. install.package("dplyr") library(dplyr) anti_join (x1, x2) You can get help on the different functions by ?function.name(), so ?anti_join() will bring you help - and examples - on the anti_join function. It might be worth testing your approach on a small subset of the data. That makes it easier for you to follow what happens
2009 Oct 17
1
Easy way to `iris[,-"Petal.Length"]' subsetting?
Dear all What is the easy way to drop a variable by using its name (and not its number)? Example: > data(iris) > head(iris) Sepal.Length Sepal.Width Petal.Length Petal.Width Species 1 5.1 3.5 1.4 0.2 setosa 2 4.9 3.0 1.4 0.2 setosa 3 4.7 3.2 1.3 0.2 setosa 4 4.6 3.1
2006 Dec 18
5
Replacing values
Hi all, I have to recode some values in a dataset. for example changing all zeros to "." or 999 would be also ok. does anybody know how to do this? thanks in advance. lars -- View this message in context: http://www.nabble.com/-R--Replacing-values-tf2841687.html#a7934402 Sent from the R help mailing list archive at Nabble.com.
2005 Apr 27
4
How to add some of data in the first place dataset
Dear R-help, First I apologize if my question is quite simple. I need add some of data in the first place my dataset, how can I do that. I have tried with rbind, but I did not succes. 0.1 3.6 0.4 0.9 rose 4.1 4.0 1.2 1.2 rose 4.4 3.2 1.9 0.5 rose 4.6 1.1 1.1 0.2 rose For example,
2011 Aug 10
2
round() a data frame containing 'character' variables?
Dear all It is difficult to use round(..., digits=2) on a data frame since one has to first take care to remove non-numeric variables such as 'character' or 'factor': > head(round(iris, 2)) Error in Math.data.frame(list(Sepal.Length = c(5.1, 4.9, 4.7, 4.6, 5, : non-numeric variable in data frame: Species > head(round(iris[1:4], 2)) Sepal.Length Sepal.Width Petal.Length
2006 May 31
2
a problem 'cor' function
Hi list, One of my co-workers found this problem with 'cor' in his code and I confirm it too (see below). He's using R 2.2.1 under Win 2K and I'm using R 2.3.0 under Win XP. =========================================== > R.Version() $platform [1] "i386-pc-mingw32" $arch [1] "i386" $os [1] "mingw32" $system [1] "i386, mingw32" $status
2012 Aug 01
3
Neuralnet Error
I require some help in debugging this codeĀ  library(neuralnet) ir<-read.table(file="iris_data.txt",header=TRUE,row.names=NULL) ir1 <- data.frame(ir[1:100,2:6]) ir2 <- data.frame(ifelse(ir1$Species=="setosa",1,ifelse(ir1$Species=="versicolor",0,""))) colnames(ir2)<-("Output") ir3 <- data.frame(rbind(ir1[1:4],ir2))
2008 Feb 27
2
multiple plots per page using hist and pdf
Hello, I am puzzled by the behavior of hist() when generating multiple plots per page on the pdf device. In the following example two pdf files are generated. The first results in 4 plots on one pdf page as expected. However, the second, which swaps one of the plot() calls for hist(), results in a 4 page pdf with one plot per page. How might I get the histogram with 3 other scatter
2010 Feb 03
1
Calculating subsets "on the fly" with ddply
Hi, [I sent this to the plyr mailing list (late) last night, but it seems to be lost in the moderation queue, so here's a shot to the broadeR community] Apologies in advance for being more verbose than necessary, but I'm not even sure how to ask this question in the context of plyr, so ... here goes. As meaningless as this might be to do with the `iris` data, the spirit of it is what
2006 Jan 02
2
How to create "special" (source) file
Dear All, I'm a Marine Biologist using R (in a most informal and applied way) for a couple of years. Actually, I've been using R to analyse the results supporting my thesis. I would like to put together (in the same file) the data (.txt files) and the scripts files (.R files) for each chapter. How can I do this? Thanks in advance, Eduardo Esteves [[alternative HTML version deleted]]
2012 Jul 31
1
kernlab kpca predict
Hi! The kernlab function kpca() mentions that new observations can be transformed by using predict. Theres also an example in the documentation, but as you can see i am getting an error there (As i do with my own data). I'm not sure whats wrong at the moment. I haven't any predict functions written by myself in the workspace either. I've tested it with using the matrix version and the
2018 Jan 28
0
Newbie wants to compare 2 huge RDSs row by row.
The diffobj package (https://cran.r-project.org/package=diffobj) is really helpful here. It provides "diff" functions diffPrint(), diffStr(), and diffChr() to compare two object 'x' and 'y' and provide neat colorized summary output. Example: > iris2 <- iris > iris2[122:125,4] <- iris2[122:125,4] + 0.1 > diffobj::diffPrint(iris2, iris) < iris2 >
2018 Jan 28
1
Newbie wants to compare 2 huge RDSs row by row.
Thanks, I think I've found the most succinct expression of differences in two data.frames... length(which( rowSums( x1 != x2 ) > 0)) gives a count of the # of records in two data.frames that do not match. // ________________________________________ From: Henrik Bengtsson [henrik.bengtsson at gmail.com] Sent: Sunday, January 28, 2018 11:12 AM To: Ulrik Stervbo Cc: Marsh Hardy ARA/RISK;
2011 Jul 28
2
not working yet: Re: lattice overlay
Hi Dieter and R community: I tried both of these three versions with ylim as suggested, none work: I am getting only single (pch = 16) not overlayed (pch =3) everytime. *vs 1* require(lattice) xyplot(Sepal.Length ~ Sepal.Width | Species , data= iris, panel= function(x, y, subscripts) { panel.xyplot(x, y, pch=16, col = "green4", ylim = c(0, 10)) panel.lmline(x, y, lty=4, col =
2010 Jul 29
1
where did the column names go to?
I've just tried to merge 2 data sets thinking they would only keep the common columns, but noticed the column count was not adding up. I've then replicated a simple example and got the same thing happening. q1. why doesn't 'b' have a column name? q2. when I merge, why does the new column 'y' have all values as 5.1? Thanks in advance, Mr. confused > a <-
2012 Jul 10
3
fill 0-row data.frame with 1 line of NAs
Dear all Is there a simpler method to achieve the following: When I obtain an empty data.frame after subsetting, I need for it to contain one line of NAs. Here's a dummy example: > (.xb <- iris[ iris$Species=='zz', ]) [1] Sepal.Length Sepal.Width Petal.Length Petal.Width Species <0 rows> (or 0-length row.names) > dim(.xb) [1] 0 5 > (.xa <-
2005 Sep 26
3
How to get the rowindices without using which?
Hi, I was wondering if it is possible to get the rowindices without using the function "which" because I don't have a restriction criteria. Here's an example of what I mean: # take 10 randomly selected instances iris[sample(1:nrow(iris), 10),] # output Sepal.Length Sepal.Width Petal.Length Petal.Width Species 76 6.6 3.0 4.4 1.4