similar to: loading several "samples" of data from hard-drive, run "lm", "rlm", etc, save results in a list

Displaying 20 results from an estimated 4000 matches similar to: "loading several "samples" of data from hard-drive, run "lm", "rlm", etc, save results in a list"

2018 Jan 31
0
MICE data analysis with glmulti
Dear All, wonder if you have some thoughts on running the with() function (and perhaps including the pool() function to get the results?) in glmulti? In other words, how to run glmulti with a data set that is produced by mice()? publicly available code: data <- airquality data[4:10,3] <- rep(NA,7) data[1:5,4] <- NA data <- data[-c(5,6)] library(mice) library(glmulti) the following
2017 Jun 26
0
Odd behaviour in within.list() when deleting 2+ variables
This seems to be due to changes made by Martin Maechler in 2008. Presumably this fixed something, but it escapes my memory. However, it seems to have broken the equivalence between within.list and within.data.frame, so now within.list <- within.data.frame does not suffice. The crux of the matter seems to be that both the following constructions work for data frames > aq <-
2017 Jun 26
0
Odd behaviour in within.list() when deleting 2+ variables
> On 26 Jun 2017, at 19:04 , Martin Maechler <maechler at stat.math.ethz.ch> wrote: > >>>>>> peter dalgaard <pdalgd at gmail.com> >>>>>> on Mon, 26 Jun 2017 13:43:28 +0200 writes: > >> This seems to be due to changes made by Martin Maechler in >> 2008. Presumably this fixed something, but it escapes my >> memory. >
2017 Jun 26
1
Odd behaviour in within.list() when deleting 2+ variables
>>>>> "PD" == Peter Dalgaard <pdalgd at gmail.com> >>>>> on Mon, 26 Jun 2017 20:12:38 +0200 writes: >> On 26 Jun 2017, at 19:04 , Martin Maechler >> <maechler at stat.math.ethz.ch> wrote: >> >>>>>>> peter dalgaard <pdalgd at gmail.com> on Mon, 26 Jun
2017 Jun 26
2
Odd behaviour in within.list() when deleting 2+ variables
>>>>> peter dalgaard <pdalgd at gmail.com> >>>>> on Mon, 26 Jun 2017 13:43:28 +0200 writes: > This seems to be due to changes made by Martin Maechler in > 2008. Presumably this fixed something, but it escapes my > memory. Yes: The change set (svn -c46441) also contains the following NEWS entry BUG FIXES o
2006 Jul 23
1
Iterated Data Input/Output with Random Forests
Hi, I am currently writing code to input a few thousand files, run them through the Random Forests package, and then output corresponding results. When I use the code below: zz<-textConnection("ex.lm.out", "w") sink(zz)
2007 Sep 16
1
Identifying objects from a data set
Hello Given the following data for a data set called airquality. To identify the nature of the objects from the data set airquality example "Ozone" would it be best to use the command is. like is.character(airquality$Ozone) ....... I tried attributes(airquality$Ozone) but it came up null. Would there be a better way to identify these objects. Thanking you in advance for your
2008 Dec 19
0
What BIC is calculated by 'regsubsets'?
The function 'regsubsets' appears to calculate a BIC value that is different from that returned by the function 'BIC'. The latter is explained in the documentation, but I can't find an expression for the statistic returned by 'regsubsets'. Incidentally, both of these differ from the BIC that is given in Ramsey and Schafer's, The Statistical Sleuth. I assume
2012 Feb 23
1
Sexpr not getting expanded in Sweave
An Sweave file, 'test.Rnw': \documentclass{article} \title{Sweave minimal} \author{MK} \begin{document} \maketitle We try Sweave: <<1>>= data(airquality) summary(airquality) x <- airquality[1, 1] @ I try Sexpr: \Sexpr{x} We plot: \begin{center} <<2, fig=TRUE, echo=FALSE >>= boxplot(Ozone ~ Month, data = airquality) @ \end{center} \end{document} I check the
2005 Jul 01
2
Simple indexing conundrum
My apologies in advance for my thickness but I can't seem to solve the following, seemingly simple, data manipulation problem: I have a data frame that contains multiple factors and multiple continuous response variables, but duplicates of some factor combinations. The duplicates contain bad data, so I would like to eliminate the duplicates. I would like to retain the entire rows
2003 Jun 19
1
lattice and Sweave
I'm having trouble using lattice and Sweave together. An example of the trouble is the chunk <<fig=true, eps=false>>= library(nlme) data(Orthodont) plot(Orthodont) @ This gives a warning Warning message: No Active Device, using default values in: trellis.par.get("add.text") and creates a pdf file with no pages. I think this is related to the fact that a figure
2009 Apr 28
1
Problem with Random Forest predict
I am trying to run a partialPlot with Random Forest (as I have done many times before). First I run my forest... Cell is a 6 level factor that is the dependent variable - all other variables are predictors, most of these are factors as well. predCell<-randomForest(x=tempdata[-match("Cell",names(tempdata))],y=tempdata$Cell,importance=T) Then I try my partial plot to look at the
2017 Jun 21
0
selecting dataframe columns based on substring of col name(s)
> On Jun 21, 2017, at 9:11 AM, Evan Cooch <evan.cooch at gmail.com> wrote: > > Suppose I have the following sort of dataframe, where each column name has a common structure: prefix, followed by a number (for this example, col1, col2, col3 and col4): > > d = data.frame( col1=runif(10), col2=runif(10), col3=runif(10),col4=runif(10)) > > What I haven't been able to
2011 Dec 23
2
cast in reshape and reshape2
> library(reshape2) > x = melt(airquality, id=c('month', 'day')) With reshape I can cast with multiple functions: > library(reshape) > cast(x, month+variable~., c(mean,sd)) month variable mean sd 1 5 ozone 23.615385 22.224449 2 5 solar.r 181.296296 115.075499 3 5 wind 11.622581 3.531450 4 5 temp 65.548387
2019 Jun 04
1
Trivial error in documentation
This must have been there for a while> In the datasets package, the help for airquality says: A data frame with 154 observations on 6 variables. But: > str(airquality) 'data.frame':??? 153 obs. of? 6 variables: ?$ Ozone? : int? 41 36 12 18 NA 28 23 19 8 NA ... ?$ Solar.R: int? 190 118 149 313 NA NA 299 99 19 194 ... ?$ Wind?? : num? 7.4 8 12.6 11.5 14.3 14.9 8.6 13.8 20.1 8.6
2004 Dec 12
1
Re: [R-sig-finance] dates and times on Windows for fMetrics
# Here is the solution: require(fBasics) # Be sure that R is running in time zone GMT. # Set your Windows environment variable to "GMT" # Your PC Windows clock can still run in any other time zone! # My clock is now running in Zurich in Europe. Date = c("2003-10-09", "2003-10-10", "2003-10-13", "2003-10-14") Open = c(1.27, 1.25, 1.27,
2010 Mar 24
1
flexible alternative to subsetting dataframe inside nested loops
I have a dataFrame variable: L1 L2 L3 ... v1 v2 ... 1 2 3 4 ... I want to process subsets of it as defined by combinations of L1-L2-L3. I do it successfully using nested loops: for (i in valuesOfL1 { for (j in valuesOfL2) { for (k in valuesOfL3) { tempData <- subset(dataFrame, (L1 == i & L2 == j & L3 == k, select=c(v1,v2) )) if
2018 Dec 12
2
Subset dentro de un for
Gracias a los tres, Raúl, Marcelino y Carlos. Lo del "get" de Marcelino me da la respuesta a lo que yo exactamente preguntaba, y funciona, pero ahora tengo problemas con el for, por lo que probablemente recurra al eval parse de Raúl o Carlos, que ya tienen el for. Aún así, lo intento 1º con el get. Con subset(df, subset=get(GT[i])>0) el problema es que en el for hago un
2003 Jan 24
1
problem with srt vector in xyplot {lattice}
[ R 1.6.1 ] PROBLEM The plot of the appended code does produce a postscript file which is not interpretable by gv under Linux. REMARK If the srt argument is commented out or set to a constant like 45 or 90, the ps file becomes interpretable. CODE xytest <- function( ... ){ with( airquality, { print( xyplot( Ozone ~ Temp | Month , panel
2006 Jun 03
1
warnings messages from R when returning nothing
Hi : I have old Splus code that I am trying to turn into R ( I am using windows Xp and R 2.20 ) and I am getting a warning from one of my statements because the behavior of R is different from Splus. below, tempdata is a matrix of numbers and I have the following command which basically runs through the columns and returns the minimum index of the column where an NA occurs.