search for: templist

Displaying 9 results from an estimated 9 matches for "templist".

2009 Apr 03
2
Help pasting string as object name
...t;AK", "AZ",...) of length 50. I would like a new dataframe with st.list in one column and the value of "d$density" for that state when d$Date==Feb-09 in another column. How can I do this? Here is what I have tried: names <- rep("d$density",length(st.list)) templist <- as.vector(mapply(paste, names, st.list ,sep=".")) d.2<-data.frame() for (i in 1:length(templist)) { d.2$density[i] <- subset(parse(file="",templist[i]),d$Date=="Feb-09") i<-i+1 } ### hangs! Thanks for any help! _____________________________________...
2012 Aug 03
2
Recursive function calls
...ces I didn't find something that seemed to help with this problem. Thank you very much. trim <- function(x) { if(length(x)>1) sapply(x[1], trim) gsub("^[[:space:]]+|[[:space:]]+$", "", x) } tempobj = ' many spaces ' tempvec = c(tempobj, tempobj) templist = list(tempvec, tempvec) tempdf = data.frame(x = tempvec, y = tempvec) trim(tempobj) trim(tempvec) trim(templist) trim(tempdf) Thank you, Gene Leynes _____________________________________________ *Data Scientist* *Mobile: 312-498-7702 **http://www.linkedin.com/in/geneleynes * <http://go...
2007 May 12
1
function similar to "get" that works for both an object, and elements of an object?
...ngle function similar to "get" that works for both an object, and elements of an object ? #(I want the function to be able to return objects, and/or the deeper elements of an object.) #(i.e. elements of a dataframe and/or list)? #e.g. tempdf = data.frame(a=c(4,5,6) , b=c(10,11,12) ) templist= list(x=tempdf, y=c(1,2)) get('tempdf') #works as desired get('tempdf$a') #retrusn errro message get('templist$x') #retrusn errro message --------------------------------- 8:00? 8:25? 8:40? Find a flick in no time [[alternative HTML version deleted]]
2011 May 27
0
saving multiple arrays from a foreach loop
...:n.run) { z = check(j) x[,, j] <- z$sme y[,, j] <- z$test }) #### trying to do the same with a foreach loop - does not work!! require(doSMP) workers <- startWorkers(2) # My computer has 2 cores registerDoSMP(workers) notcreative = array(NA,dim=c(4,n.vpn,n.l?ufe)) tempList = list(matrix(NA,4,n.vpn),matrix(NA,4,n.vpn)) system.time(notcreative <- foreach(j=1:n.run) %dopar% { tempList=check(j) x[,,j] = tempList$sme y[,,j] = tempList$test }) stopWorkers(workers) -- ____________ lic. phil. Nicolas A. J. Berkowitsch Universit?t Basel Fakult...
2010 Jan 18
3
Using the output of strsplit
I successfully combined my data frames, and am now on my next hurdle. I had combined the data and quarter, and used tapply to count the entries for each unique date/quarter pair. ar= tapply(ewrgnd$gw, list(ewrgnd$dq), sum) #for each date/quarter combination sums the gw (which are all 1) dq=row.names(ar) spl=strsplit(dq) But I need to split them back into the separate date and quarter. So I used
2007 Jan 08
3
strange file sizes in log
Hello everyone, I'm getting strange module sizes in the logs. (2.6.9) This is the command: rsync -anr --delete --omit-dir-times --stats -e "ssh -i access.key -l pluto -p 22" --files-from=config\templist "/cygdrive/C/" sv_rs@192.168.10.49::Accounts After updating all the files on the "Accounts" module, the size is reported correctly on the receiver log file as: 2007/01/08 18:24:24 [30153] sent 22485 bytes received 27427 bytes total size 68937712 * This is the real size (ar...
2008 Aug 14
2
Determining cause of error?
This is both a specific question and a general one. First, I am running 'fitdistr' from library(MASS) and I get the following: Error in fitdistr(templist, "weibull") : optimization failed What is the cause of the error? How can I tell? Can I just catch this error, report it and move to the next set of data (eat the exception)? Thank you. Kevin
2008 May 05
3
merge numerous columns of unequal length
I have numerous objects, each containing continuous data representing the same variable, movement rate, yet each having a different number of rows. e.g. d1<-as.matrix(rnorm(5)) d2<-as.matrix(rnorm(3)) d3<-as.matrix(rnorm(6)) How can I merge these three columns side-by-side in order to create a table regardless of the difference in length? I wish to analyze the output in a spreadsheet
2008 May 07
1
speedup remains 1
...he meantime, the sender generated a new file, which I know for a fact to be very similar to the manually transferred version. I'm trying to rsync the new file with: rsync -av --delete --omit-dir-times --chmod=ugo=rwX -b --backup-dir=backup --progress -e "bin\ssh -l user" --files-from=templist "/cygdrive/D/" 217.xxx.xxx.xxx::SQL The problem is that the file, backup.bak is being transferred from scratch... several hours at the max bandwidth (with no speedup). I cannot complete the transfer like this, but never in 4 hours did the transfer speed exceed physical network upload lim...