similar to: Use dump or write? or what?

Displaying 20 results from an estimated 400 matches similar to: "Use dump or write? or what?"

2011 Aug 03
2
Error message for MCC
Greetings all, I am getting an error message that is stifling me. Any ideas? > ## Define Directories ## > load_from <- "/home/mcc/Dropbox/abrodsky/kegg_combine_data/" > save_to <- "/home/mcc/Dropbox/abrodsky/ttest_results/" > > ############################### > ## Define Columns To Compare ## > compareA <- "log_b_rich" > compareB
2006 Jun 26
2
probably need to se sapply but i can't get it
Hi : I think I need to use sapply but I can't figure this out. Suppose I have two vectors : tempa ( 4, 6,10 ) and tempb ( 11,23 ,39 ) I want a function that returns 4:11,6:23 and 10:39 as vectors. I tried : sapply(1:length(tempa) function (z) seq(tempa[z],tempb[z]) but i got 3 really strange vectors back in the sense that the numbers in them did not make no sense to me. obviously, i
2006 Nov 16
1
getting a title in a plot during an lapply
In my code below tempa and tempb are numeric vectors that I combined into a dataframe along with the deciles of tempa. I have an lapply statement that goes through the dataframe and does ten plots according to the appropriate decile. The code is below and it works fine. There are no bugs so I figure there was no need to include structure statements on the data. Also, I don't want to use coplot
2006 Jun 27
1
related to my previous sapply question]
in my previous post in which i asked about creating sequences from two vectors of numbers, all suggestions worked. tradevectors<-mapply(seq,from=tempa,to=tempb) or tradevectors<-sapply(1:length(tempa),function(x) seq(tempa[x],tempb[x]) >both return a list with 3 components. the problem is that i want to take these 3 sequences and use them as the indices of two other vectors, X and
2011 Jul 31
5
Appending 4 Digits On A File Name
Greetings all, I would like to append a 4 digit number suffix to the names of my files for later use. What I am using now only produces 1 or 2 or 3 or 4 digits. ############ for (i in 1:1000) { temp <- (kegg [i,]) temp <- merge (temp, subrichcdt, by="gene") file.name <- paste ("kegg.subrichcdt.", i, ".txt", sep="")
2008 Jun 04
2
converting a table to a dataframe or a matrix
can someone show me how to convert a table to a data.frame or a matrix ? I tried below and as.data.frame rearranges the columns similarly to a melt from reshape and as.matrix didn't change it. I actually would prefer to change it to a dataframe but if someone can show me how to convert it to a matrix, then as.data.frame will work on that. I was thinking about just changing the class to
2006 Jun 28
2
hopefully my last question on lapply
Marc and many other people ( whose names escape me ) have been very helpful in explaining the use of lapply to me. In his last response, Marc explained that if tradevectors is a list of vectors of different lengths ( excuse my terminology ) then lapply(tradevectors,function(x) G[x]*B[x] ) will go through each component of the list as if it was a vector and apply the element by element
2011 Aug 01
2
Errors, driving me nuts
Greetings all, I am getting this error that is driving me nuts... (not a long trip, haha) I have a set of files and in these files I want to calculate ttests on rows 'compareA' and 'compareB' (these will change over time there I want a variable here). Also these files are in many different directories so I want a way filter out the junk... Anyway I don't believe that this is
2011 Aug 07
1
reshape::rename package unable to install !?!
Greetings all, I have been working with RStudio and R only for a little while. I came across a package called 'reshape' that helped me 'rename' columns. Unfortunately, my computer got hosed (too much playing with linux too late at nite) and I had to re-install everything, BUT when I tried to reinstall 'reshape' or 'reshape2' I COULDN't. Is there a way to get
2011 Aug 16
1
Unusual separators
Hi all, I have a list that I got from a web page that I would like to crunch. Unfortunately, the list has some unusual separators in it. I believe the columns are separated by 1 space and 1 tab. I tried to insert this into the read.table( ..., sep=" \t", ...) but got an error that said something like 'only one byte separators can be used. I have thought about using a gsub to
2011 Aug 05
2
Which is more efficient?
Greetings all, I am curious to know if either of these two sets of code is more efficient? Example1: ## t-test ## colA <- temp [ , j ] colB <- temp [ , k ] ttr <- t.test ( colA, colB, var.equal=TRUE) tt_pvalue [ i ] <- ttr$p.value or Example2: tt_pvalue [ i ] <- t.test ( temp[ , j ], temp[ , k ], var.equal=TRUE) ------------- I have three loops, i, j, k. One to test the all of
2008 Oct 22
4
A matrix automation problem
[I am really sorry if it is double posted, I doubt me previous post could not reach forum due to some problem with net] Suppose I have a matrix : a = matrix(1:9, 3) >From this matrix, I construct 9 additional matrices : i = 1:9 bi = a * i Now combining all those 9 new matrices, I construct a final metrix as : c = b1 b4 b7 b2 b5 b8 b3 b6 b8 I want to automate this procedure for any
2012 May 30
1
caret() train based on cross validation - split dataset to keep sites together?
Hello all, I have searched and have not yet identified a solution so now I am sending this message. In short, I need to split my data into training, validation, and testing subsets that keep all observations from the same sites together ? preferably as part of a cross validation procedure. Now for the longer version. And I must confess that although my R skills are improving, they are not so
2006 Jan 23
1
will vectorization help in this case?
Hi all, I am doing a array marginalization over one dimension in the following manner: =========================================================== for(l in 1:L) { flst=list(Pzu, Pzi, array(Puzu[,as.character(r[[l,"u"]])], dim=dim(Puzu)[1], dimnames=dimnames(Puzu)[1]), array(Pizi[,as.character(r[[l, "i"]])], dim=dim(Pizi)[1], dimnames=dimnames(Pizi)[1]) ); tempa = 1;
2012 Jul 03
2
EM algorithm to find MLE of coeff in mixed effects model
I have a general question about coefficients estimation of the mixed model. I simulated a very basic model: Y|b=X*\beta+Z*b +\sigma^2* diag(ni); b follows N(0,\psi) #i.e. bivariate normal where b is the latent variable, Z and X are ni*2 design matrices, sigma is the error variance, Y are longitudinal data, i.e. there are ni
2010 Apr 29
3
dump not evaluating promises?
I'm using the dump command to pass data to WinBUGS/OpenBUGS/JAGS and have run into a problem. Here is some R-code: foo <- array(1:6, dim=c(2,3)) dump('foo', file='dumpdata.R') dump('foo', file='dumpdata.R', append=TRUE, evaluate=TRUE) foo2 <- array(c(2,3,5,7,9,7,5,3), dim=c(2,4)) dump('foo2', file='dumpdata.R', append=TRUE) And here is
2006 Jun 04
5
WCTDM-24xxp woes
I am currently running Asterisk 1.2.8, on an AMD Sempron 3100+ (ASUS K8N Nforce based board). I am using a Digium wctdm24xxp to terminate 8 (2x quad) FXO lines. Using ztmonitor (From zapata) I cannot see that there is any registerable incoming volume from these lines. I've been running them at rxgain = 25 (zapata.conf) to make the audio audible, however this creates poor call quality issues
1999 Mar 31
2
"dump" Splus -> R
Hi All, I just used "dump" on Splus to transfer a pile of survival objects from Splus 3.4 on Solaris 7 to R 0.63.3 on Intel. The only trick is that survival objects contain an element holding the original call that generated the object. When Splus writes these out, it doesn't mark them in any way, so when R tries to read them in, it ends up trying to reevaluate the call. Not
1999 Mar 31
2
"dump" Splus -> R
Hi All, I just used "dump" on Splus to transfer a pile of survival objects from Splus 3.4 on Solaris 7 to R 0.63.3 on Intel. The only trick is that survival objects contain an element holding the original call that generated the object. When Splus writes these out, it doesn't mark them in any way, so when R tries to read them in, it ends up trying to reevaluate the call. Not
2009 May 15
4
replace "%" with "\%"
Dear all, I'm trying to gsub() "%" with "\%" with no obvious success. > temp1 <- c("mean", "sd", "0%", "25%", "50%", "75%", "100%") > temp1 [1] "mean" "sd" "0%" "25%" "50%" "75%" "100%" > gsub("%",