similar to: Frame Column to List (conversion)

Displaying 20 results from an estimated 120 matches similar to: "Frame Column to List (conversion)"

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)
2009 Nov 02
3
problems with read.csv
Dear all, I''d like to ask help on R code to get the same results as the following Splus code: >indata<-importData("/home/data_new.csv") >indata[1:5,4] [1] 0930 1601 1006 1032 1020 I tried the following R code: > indata<-read.csv("/home/data_new.csv") > indata[1:5,4] [1] 930 1601 1006 1032 1020 I''d like the first
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
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
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.
2003 Nov 04
5
read.spss Error reading system-file header
Is there any documentation on what kind of SPSS file can and cannot be read by read.spss? Alternatively, how can one modify or "clean" an SPSS file to make it readable by read.spss? What properties must a *.sav file before read.spss can read it? The file in this example is 270KB, with 5 rows and 173 columns. I have no trouble reading larger files with read.spss, so it's not
2006 Jul 05
2
apologes if you already saw this :efficiency question
hi everyone : i'm not sure if my previous mail about this got sent. i was typing and erroneosuyl hit a button and lost what i was typing. anyway, i have the code below ( it works ) in which i run through the rows of a dataframe, taking out the first two fields which are characters strings ( with some extra spacing so i yuse gsub) and appending these character strings to a list so that i can
2012 Dec 20
2
Filling Lists or Arrays of variable dimensions
Following problem: Say you have a bunch of parameters and want to produce results for all combinations of those: height<-c("high","low") width<-c("slim","wide") then what i used to do was something like this: l<-list() for(h in height){ l[[h]]<-list() for(w in width){ l[[h]][[w]] <- doSomething() } } Now those parameters aren't
2008 May 13
2
array dimension changes with assignment
Why does the assignment of a 3178x93 object to another 3178x93 object remove the dimension attribute? > GT <- array(dim = c(6,nrow(InData),ncol(InSNPs))) > dim(GT) [1] 6 3178 93 > SNP1 <- InSNPs[InData[,"C1"],] > dim(SNP1) [1] 3178 93 > SNP2 <- InSNPs[InData[,"C2"],] > dim(SNP2) [1] 3178 93 > dim(pmin(SNP1,SNP2)) [1] 3178 93
2010 Oct 03
2
Read file
Dear R-users, I would like to know how could I read a file with different lines lengths. I need read this file and create an output to feed my database. So after reading I'll need create an output like this "INSERT INTO TEMP (DATA,STATION,VAR1,VAR2) VALUES (20100910,837460, 39,390)" I mean, each line should be read. But I don`t how to do this when these lines have different
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,
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
2011 Aug 03
4
Convert matrix to numeric
I have a matrix that looks like this: structure(c("0.0376673981759913", "0.111066500741386", "1", "1103", "18", "OPEN", "DEPR", "0.0404073656092023", "0.115186044704599", "1", "719", "18", "OPEN", "DEPR", "0.0665342096693433",
2008 Feb 25
1
Problems with augPlot and for loops
Dear all, I'm a new R user and I find myself in trouble with some of the plot functions. I'm trying to save a sequence of plots to eps files using a for loop, but I get only empty figures. In each iteration of the for loop I fit a nlme model and I'd like to plot its prediction of the dependent variable values. This is the code I'm using to plot the figures (I removed the commands I
2012 Feb 03
1
incomplete final line found on <name of my sourced function file>
Dear R-ers, I hope there is a really simple solution to my problem. I've written a function that I saved in an .r file. I source this file in my code. For a while it worked fine. But then when I run the line: source("F mylineplot.r") I started getting a warning: In readLines(file) : incomplete final line found on 'F mylineplot.r' I have no idea why - I tried to check and
2004 Aug 09
4
hclust-segmentation fault
I am getting the "Segmentation fault" when using hclust in R-1.9.1 running under SuSe 9.0 64-bit kernel on a dual opteron system with 8G of RAM. I was wandering if anybody could offer any insight? Thanks, mario.
2007 Oct 10
0
encode return 0
Hi. I?m trying to use the speex library in c#, everything seems to works right, when I call the speex_encode_int function it always return 0, any help would be appreciated. Here?s the sequence of calls: //Initialization _Mode = speex_lib_get_mode(0); _State = speex_encoder_init(_Mode); fixed (int* __FrameSize = &_FrameSize, __Complexity =
2007 May 31
0
loading several "samples" of data from hard-drive, run "lm", "rlm", etc, save results in a list
I have many "sample" datasets (e.g. sample 5, sample 6, etc), each identified by a number as a suffix. These datasets are saved as individual R objects on my hard drive. (e.g."Wind.5.r" . "Wind.6.r","Solar.5.r","Solar.6.r") For example purposes, I have written code that creates similar data files using the "airquality" dataset. (see
2006 Nov 20
3
problem with loop to put data into array with missing data forsome files
Hi Jenny If you want a general solution I understand. However I just downloaded the file fine (as far as I can tell) so you are welcome to have a copy. I can email it to you if you want. I do not think your test for NA is valid. i.e if(test != "NA"){ } I think you should use if(is.na(test)){ } Or something similar. J --- John Seers Institute of Food Research Norwich
2010 Apr 12
1
N'th of month working day problem
Dear Gabor, Thanks for your reply. however: > tail(DJd) ^DJI.Close 2010-04-01 10927.07 2010-04-05 10973.55 2010-04-06 10969.99 2010-04-07 10897.52 2010-04-08 10927.07 *2010-04-09 10997.35* > tail(ag) 2009-11-30 10344.84 2009-12-31 10428.05 2010-01-31 10067.33 2010-02-28 10325.26 2010-03-31 10856.63 *2010-04-30 10997.35 * It seems the script "makes up"