similar to: How to speed up multiple for loop over list of data frames

Displaying 20 results from an estimated 400 matches similar to: "How to speed up multiple for loop over list of data frames"

2010 Feb 23
1
function on all pairs of vector entries
Hello all, Is there a way in R to compute the multivariate normal density of every pair of entries in a vector efficiently instead of using for loop? For example Suppose I have a vector a=c(v_1,...,v_p)=c(0.5343909, -0.7784353, -0.0568370, 1.8772838, -1.3183407, 0.8227418,...) I want to compute density(v_i, v_j) for every pair of entries (i,j) (i!=j) in a. The joint bivariate distribution
2007 Nov 15
5
Multiply each column of array by vector component
Hi, I've got an array, say with i,jth entry = A_ij, and a vector, say with jth entry= v_j. I would like to multiply each column of the array by the corresponding vector component, i,e. find the array with i,jth entry A_ij * v_j This seems so basic but I can't figure out how to do it without a loop. Any suggestions? Michal.
2006 Oct 03
1
Summation in R
Hello! Maybe this is a trivial question as I'm still a new baby in R but I wish that u will help me. I want to calculate the following U= sum (t_j*v_j) where t_j is a vector and v_j is the matrix Thanks Dina
2007 Oct 23
4
Replace values on seq
Hey guys, sorry for the inconvenience (this might be a hundred times answered question), but I have been searching a while and gave up about the following: I have the following, table and data: table <- seq(255, 0, by=-1) data <- c(1,8,...) <--- doesn't matter what's in here Which would be the most efficient way to replace each data value, v_i, by table[v_i + 1] ? And, maybe
2009 Oct 24
1
dev.copy(postscript,...) generates a disrupted string
Dear R-Users, I have the following problem: I would like to create a postscript file containing an r-plot with the string "\\vartheta" in it (reason: this is later converted to the TeX-string "\vartheta" and a vartheta is printed in the figure). In the minimal example below, the problem is that the created postscript file does _not_ contain the string "\\vartheta
2006 Jun 30
1
lme and SAS Proc mixed
I am trying to use lme to fit a mixed effects model to get the same results as when using the following SAS code: proc mixed; class refseqid probeid probeno end; model expression=end logpgc / ddfm=satterth; random probeno probeid / subject=refseqid type=cs; lsmeans end / diff cl; run; There are 3 genes (refseqid) which is the large grouping factor, with 2 probeids nested within each refseqid,
2007 Feb 28
1
Efficient way to repeat rows (or columns) of a matrix?
Hi. If I have a vector, v_1, and another vector of positive integers, i_1, the same length as v_1, then rep(v_1,i_1) will repeat v_i[j] exactly i_1[j] times, like so: >rep(c(1,2,3),c(3,2,1)) [1] 1 1 1 2 2 3 > I'd like to do the same sort of thing where I replace v_1 with a matrix, and the jth row of the matrix is repeated i_1 times. Obviously, I could do this with for loops, like
2011 Oct 03
1
minimisation problem, two setups (nonlinear with equality constraints/linear programming with mixed constraints)
Dear All, Thank you for the replies to my first thread here: http://r.789695.n4.nabble.com/global-optimisation-with-inequality-constraints-td3799258.html. So far the best result is achieved via a penalised objective function. This was suggested by someone on this list privately. I am still looking into some of the options mentioned in the original thread, but I have been advised that there may
2005 Feb 15
1
shrinkage estimates in lme
Hello. Slope estimates in lme are shrinkage estimates which pull the OLS slope estimates towards the population estimates, the degree of which depends on the group sample size and the distance between the group-based estimate and the overall population estimate. Although these shrinkage estimates as said to be more precise with respect to the true values, they are also biased. So there is a
2012 Dec 10
1
Long equation in documentation
I have a long equation that I need to break in the R documentation of a package or it trails off the right hand side of the page. Here's the formula: \deqn{Cov(r_{ist}, r_{iuv})= [.5\rho_{ist}\rho_{iuv}(\rho_{isu}^2 + \rho_{isv}^2 + \rho_{itu}^2 + \rho_{itv}^2) + \rho_{isu}\rho_{itv}+ \rho_{isv}\rho_{itu}-(\rho_{ist}\rho_{isu}\rho_{isv} + \rho_{its}\rho_{itu}\rho_{itv}) +
2004 May 10
2
Pdb-useredit
G'day ya all. i had a few day's off, and was able to make samba-3's first user editor (it's actualy an front-end for pdbedit!!) check out : http://213.34.118.231/pdbedit/ let me know what you think of this user manager for samba-3 Greetings. --------------------------------------------- Collen Blijenberg (Systeem/Netwerk Beheerder) Montessori Lyceum Herman Jordan Zeist
2006 Jun 30
0
SAS Proc Mixed and lme
I am trying to use lme to fit a mixed effects model to get the same results as when using the following SAS code: proc mixed; class refseqid probeid probeno end; model expression=end logpgc / ddfm=satterth; random probeno probeid / subject=refseqid type=cs; lsmeans end / diff cl; run; There are 3 genes (refseqid) which is the large grouping factor, with 2 probeids nested within each refseqid,
2005 Oct 19
2
[PATCH] Support for GSSAPI SASL Mechanism
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Attached is a patch against current CVS that adds support for the GSSAPI SASL mechanism. It was written from scratch, after reading the patch from Colin Walters against a much older version of dovecot. Other then support for the 'GSSAPI' mechanism, it contains the following changes: - - Added 'auth_krb5_keytab' option for
2007 Mar 05
3
Mixed effects multinomial regression and meta-analysis
R Experts: I am conducting a meta-analysis where the effect measures to be pooled are simple proportions. For example, consider this data from Fleiss/Levin/Paik's Statistical methods for rates and proportions (2003, p189) on smokers: Study N Event P(Event) 1 86 83 0.965 2 93 90 0.968 3 136 129 0.949 4 82 70 0.854 Total
2005 Jun 26
2
(sans objet)
Ma premi??re question: puis-je ??crire en fran??ais, mon anglais est pire que pire. J'essaie en fran??ais; sinon, j'essaierai une traduction! Je sduis d??butant. Ma question est donc simple, j'imagine. Je travaille sur des tableaux de statistiques. Je prends un exemple: J'ai un "frame" que j'appelle "eurostat" qui me donne des statistiques
2008 Feb 13
1
model construction
I buy flowers at a local market on a fairly regular basis. The flower vendors post their prices and if I want to buy only one or two flowers I will generally get the posted price. From time to time I want to buy large quantities of flowers, and sometimes a vendor will give me a better price than their posted price for the bulk order, but more often I have to offer them a higher price than the
2008 Feb 13
4
rolling sum (like in Rmetrics package)
Hello, I'm new to R and would like to know how to create a vector of "rolling sums". (I have seen the Rmetrics package and the rollMean function and I would like to do the same thing except Sum instead of Mean.) I imagine someone has done this, I just can't find it anywhere. Example: x <- somevector #where x is 'n' entries long #what I would like to do is: x1
2008 Feb 04
1
Java and Xalan
Hello, I have some problems running some tools of java in CentOS. Anyone know where is the problem for this? > [jv at localhost ~]$ java org.apache.xalan.xslt.Process > Exception in thread "main" java.lang.NoClassDefFoundError: org.apache.xalan.xslt.Process > at gnu.java.lang.MainThread.run(libgcj.so.7rh) > Caused by: java.lang.ClassNotFoundException:
2010 Oct 06
4
List of html_options available
I''ve noticed lots of people online complain about not good documentation for Rails. I''m a PHP programmer but I''m a newbie on Rails. I''m creating a form with a drop-down menu. I finally got to do it. I noticed there is a html_options parameter for select. I was curious as to what other html_options are available but couldn''t find a list of options. I
2012 Apr 25
2
On the Design of the R Language
http://www.cs.purdue.edu/homes/jv/pubs/ecoop12.pdf A new paper out on R the language -- I'm not all the way through it but it's been an interesting read so far. Thought it might be of interest to the list. Michael Weylandt [[alternative HTML version deleted]]