Displaying 2 results from an estimated 2 matches for "min_pct".
Did you mean:
emit_pct
2011 Nov 04
2
Reading parameters from dataframe and loading as objects
Hi List,
I want to read several parameters from data frame and load them as object
into R session, Is there any package or function in R for this??
Here is example
param <-c("clust_num", "minsamp_size", "maxsamp_size", "min_pct", "max_pct")
value <-c(15, 20000, 200000, 0.001, .999)
data <- data.frame ( cbind(param , value))
data
param value
1 clust_num 15
2 minsamp_size 20000
3 maxsamp_size 2e+05
4 min_pct 0.001
5 max_pct 0.999
My data contains many suc...
2011 Oct 31
3
How to get Quartiles when data contains both numeric variables and factors
...TRUE))
x6 <- factor(1*(x5=='a' | x5=='c'))
data1 <- cbind(x1,x2,x3,x4,x5,x6)
data <- data.frame(data1)
data <- within(data,{x5 <- factor(x5)})
x <- data
qs <- sapply(x, function(x) quantile(x, c(0.01, 0.99)))
I get an error: Error in quantile.default(x, c(min_pct, max_pct)) : factors
are not allowed
Thanks for the help.
--
View this message in context: http://r.789695.n4.nabble.com/How-to-get-Quartiles-when-data-contains-both-numeric-variables-and-factors-tp3955750p3955750.html
Sent from the R help mailing list archive at Nabble.com.