search for: petal

Displaying 20 results from an estimated 244 matches for "petal".

Did you mean: metal
2005 Mar 21
1
Convert numeric to class
...as.data.frame(as.matrix(ir.tr.iter)) Because I need the result as dataframe I convert to as.matrix, but all it only numeric > as.data.frame(as.matrix(ir.tr.iter)) V1 1 4, 1, 5, 1, 1 2 4, 1, 5, 1, 1 3 4, 1, 5, 1, 1 4 4, 1, 5, 1, 1 5 4, 1, 5, 1, 1 > ir.tr.iter [[1]] [1] Petal.Length <leaf> Petal.Width <leaf> <leaf> Levels: <leaf> Sepal.Length Sepal.Width Petal.Length Petal.Width . . . [[5]] [1] Petal.Length <leaf> Petal.Width <leaf> <leaf> Levels: <leaf> Sepal.Length Sepal.Width Petal....
2006 May 31
2
a problem 'cor' function
...or [1] "3.0" $year [1] "2006" $month [1] "04" $day [1] "24" $`svn rev` [1] "37909" $language [1] "R" $version.string [1] "Version 2.3.0 (2006-04-24)" > data(iris) > cor(iris[1:4]) Sepal.Length Sepal.Width Petal.Length Petal.Width Sepal.Length 1.0000 -0.1176 0.8718 0.8179 Sepal.Width -0.1176 1.0000 -0.4284 -0.3661 Petal.Length 0.8718 -0.4284 1.0000 0.9629 Petal.Width 0.8179 -0.3661 0.9629 1.0000 > cor(iris[1:4])==1...
2012 Aug 01
3
Neuralnet Error
...lse(ir1$Species=="versicolor",0,""))) colnames(ir2)<-("Output") ir3 <- data.frame(rbind(ir1[1:4],ir2)) #rownames(ir3)<-c("SL","SW","PL","PW","Output") print(ir3) n<- neuralnet(Output~Sepal.Length+Sepal.Width+Petal.Length+Petal.Width,data=ir3,err.fct="sse",hidden=2,linear.output=FALSE) Output: Error in neurons[[i]] %*% weights[[i]] :    requires numeric/complex matrix/vector arguments Any assisstance is appreciated [[alternative HTML version deleted]]
2012 Jun 11
1
saving sublist lda object with save.image()
...39;x' and 'y' ### And my lda obects appear to have changed and look like: > list2[[1]][[2]] $prior setosa versicolor virginica 0.3333333 0.3333333 0.3333333 $counts setosa versicolor virginica 50 50 50 $means Sepal.Length Sepal.Width Petal.Length Petal.Width setosa 5.006 3.428 1.462 0.246 versicolor 5.936 2.770 4.260 1.326 virginica 6.588 2.974 5.552 2.026 $scaling LD1 LD2 Sepal.Length 0.8293776 0.02410215 Sepal.Width 1...
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 0.2 5 5.0 3.6 1.4 0.2 6 5.4...
2012 May 03
1
Identifying case by groups in a data frame
Hi everyone, I would like to identify the case by groups that is just bigger that avg plus sd. For example, using species as group and petal.wid as my variable in the iris data. What's the better way to doit? creating a function? So,the question is to identify the single element of each species that is just larger than a cut-off point (i.e. larger than mean + sd) I made this, but I can not make a relation to to orginal data for id...
2012 Jul 31
1
kernlab kpca predict
...: list() ..@ xmatrix : num [1:130, 1:4] 5.1 4.9 4.6 5 5.4 4.6 5 4.4 4.9 4.8 ... .. ..- attr(*, "dimnames")=List of 2 .. .. ..$ : chr [1:130] "1" "2" "4" "5" ... .. .. ..$ : chr [1:4] "Sepal.Length" "Sepal.Width" "Petal.Length" "Petal.Width" .. ..- attr(*, "assign")= int [1:4] 1 2 3 4 ..@ kcall : language kpca(x = x, data = ..1, kernel = "rbfdot", kpar = ..3, features = 2) ..@ terms :Classes 'terms', 'formula' length 2 ~Sepal.Length + Sepal.Width + Petal...
2011 Jul 28
2
not working yet: Re: lattice overlay
...t 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 = "green4") panel.xyplot (iris$Petal.Length [subscripts], iris$Petal.Width[subscripts], pch= 3, col = "red") panel.lmline(iris$Petal.Length [subscripts], iris$Petal.Width [subscripts], col = "red") }, as.table=T, subscripts=T) *vs 2* require(lattice) xyplot(Sepal.Length ~ Sepal.Width | Species , data= iris,...
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 1.5 0.2 setosa 5 5.0 3.6...
2008 Feb 27
2
multiple plots per page using hist and pdf
...ge? platform powerpc-apple-darwin8.10.1 version.string R version 2.6.1 (2007-11-26) Thanks! Ben ###BEGIN data(iris) orig.par = par(no.readonly = TRUE) pdf(file = "just_plots.pdf") par(mfrow=c(2,2)) plot(iris$Sepal.Length, iris$Sepal.Width, main = "Plot 1") plot(iris$Petal.Length, iris$Petal.Width, main = "Plot 2") plot(iris$Sepal.Length, iris$Petal.Length, main = "Plot 3") plot(iris$Sepal.Width, iris$Petal.Width, main = "Plot 4") dev.off() pdf(file = "hist_and_plots.pdf") hist(iris$Sepal.Length, main = "Plot 1") p...
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 <- data.frame(matrix(rep(NA, ncol(.xb)), 1))) X1 X2 X3 X4 X5 1 NA NA NA NA NA > names(.xa) <- names(.xb) > (.xb <- .xa) Sepal.Length Sepal.Width Petal.Length Petal.Width Species 1...
2007 Mar 22
2
unexpected behavior of trellis calls inside a user-defined function
...h) : no applicable method for "depth" Smallest example I could construct to illustrate at least one of my problems: predVals <- expand.grid(list(Sepal.Length = seq(from = min(iris$Sepal.Length), to = max(iris$Sepal.Length), length = 50), Petal.Length = seq(from = min(iris$Petal.Length), to = max(iris$Petal.Length), length = 50))) irisFit <- lm(Sepal.Width ~ Sepal.Length * Petal.Length, data = iris) predSurf <- data.frame(predVals, Sepal.Width = predict(irisFit, predVals)) trellis.device("X11",widt...
2012 Jul 23
1
duplicated() variation that goes both ways to capture all duplicates
...s. Often users will want to identify and extract all the copies of the item that has duplicates, not only the duplicates themselves. To take the example from the man page: > data(iris) > iris[duplicated(iris), ] ##duplicates while searching "fromFirst" Sepal.Length Sepal.Width Petal.Length Petal.Width Species 143 5.8 2.7 5.1 1.9 virginica > iris[duplicated(iris, fromLast=T), ] ##duplicates while searching "fromLast" Sepal.Length Sepal.Width Petal.Length Petal.Width Species 102 5.8 2.7 5.1...
2011 Jul 30
1
grImport symbols
...ject directly from R without importing an external image, but rather specified as a regular grob/gTree, say. I would like to imitate my.symbols from TeachingDemos, but with grid. 2- I could not figure out what the size argument in grid.symbols() does. The following example fails rather curiously. petal.ps <- "%!PS newpath % start a new shape 0 0 moveto % move to a start location -5 10 lineto % line to a new location -10 20 10 20 5 10 curveto % curve to a third location 5 10 lineto % line to a fourth location closepath % connect back to the start location 0 setgray % set the drawing colour...
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 setosa 3 4.7 3.2 1.3 0.2 setosa ....
2010 Feb 03
1
Calculating subsets "on the fly" with ddply
...ppears I'm running into some internal evaluation/`substitute`/`parse`/scoping issues ... or my lack of understanding of how this really should be done. Essentially, I'd like to compute some summary statistics on grouped subsets of data. So, for iris data, let me try to take the mean of the Petal.Width on subsets of data as grouped by: ("some range" of sepal.length, and species). The "normal" ddply invocation would look like so: R> my <- ddply(iris, .(w=Sepal.Length < 5.5, Species), transform, grmean=mean(Petal.Width)) R> head(my) w Sepal.Length Sepal...
2006 Mar 30
2
custom strip in lattice ignoring plotmath expressions for all but style = 1 (PR#8733)
Full_Name: Ben Tyner Version: 2.2.0 OS: i686-pc-linux-gnu Submission from: (NULL) (128.210.141.240) My appologies if this has already been fixed, but I didn't see it in the tracking system yet so I thought I'd report it. Demonstration: xyplot(Petal.Length ~ Petal.Width | Species, iris, strip = strip.custom(style = 1, var.name = expression(beta), strip.names = c(T, T) ) ) # correct behavior w.r.t. var.name xyplot(Petal.Length ~ Petal.Width | Species, iris,...
2007 Jul 25
1
question on using "gl1ce" from "lasso2" package
Hi, I tried several settings by using the "family=gaussian" in "gl1ce", but none of them works. For the case "glm" can work. Here is the error message I got: > glm(Petal.Width~Sepal.Length+Sepal.Width+Petal.Length ,data=iris,family=gaussian()) > gl1ce(Petal.Width~Sepal.Length+Sepal.Width+Petal.Length ,data=iris,family=gaussian()) Error in eval(expr, envir, enclos) : object "etastart" not found Does anyone have experience with this function? Any help w...
2007 Oct 10
3
save lm output into vectors
Hi, May I ask how I can save the coefficients and the p values into a table? thanks. jiong The email message (and any attachments) is for the sole...{{dropped:11}}
2005 Apr 27
4
How to add some of data in the first place dataset
...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, > data(iris) > iris[1:10,] 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 1.5 0.2 setosa 5 5.0...