Displaying 20 results from an estimated 1100 matches similar to: "Element by element mean of a list of matrices"
2003 Oct 31
2
Summing elements in a list
Hi,
Suppose that I have a list where each component is a list of two
matrices. I also have a vector of weights. How can I collapse my
list of lists into a single list of two matrices where each matrix
in the result is the weighted sum of the corresponding matrices.
I could use a loop but this is a nested calculation so I was hoping
there is a more efficient way to do this. To help clarify,
2008 Jul 04
2
create a zero matrix & fill
Dear R user,
I have written a function which returns max,min and variation of a power
(see below)
Power is a given matrix(1,n)
I call the function
>Variation<-VAR(p,(n-deltat))
Now the problem is when I want plot(Results[1],Results[2]). Not possible!
I become the following error (in english it means: Error in
as.double.default(x) :Object cannot be transformed in double)
>
2003 Apr 23
9
sum
Dear helpers
I have a list where each element is a matrix (the list is
obtained with lapply). I want to sum those matrices. Is there a
function to do that? The sum function sums all the elements...
--
http://adsl.sapo.pt
2007 Dec 28
1
logistic mixed effects models with lmer
I have a question about some strange results I get when using lmer to
build a logistic mixed effects model. I have a data set of about 30k
points, and I'm trying to do backwards selection to reduce the number
of fixed effects in my model. I've got 3 crossed random effects and
about 20 or so fixed effects. At a certain point, I get a model (m17)
where the fixed effects are like this
2008 Mar 26
1
cbind and mean by week
Hi:
I have been able to finally crunch my data by
importing it by week(thank you all for your help),but
here we go again..
Now I'am trying to do it for the the whole year.
Since the
dataset is huge I'm only making a 3 weeks dataframe.
- I want to get the mean of pd by week
- I want to count the number of days by week and bind
it to the existing dataframe(x)
- I want to remove the
2018 Apr 12
1
WGCNA package installation segmentation fault
Hi all,
a user contacted me about a segfault when installing WGCNA package
dowloaded from CRAN. I also see a segfault like that on certain
installs of R.
The package passes all CRAN checks, so presumably this has something
to do with the R installation or environment. The R versions here are
not the newest but I would guess that this is not an R version issue.
I'm attaching two
2018 Feb 13
4
Setting the path to Rtools for package compilation on Windows
Hi all,
I'm trying to set up the Windows Rtools toolset for building packages
with compiled code. I installed for Windows R-3.4.3 from CRAN and
installed Rtools-3.4 in a custom location M:\R\R-3.4.3 and
M:\R\Rtools-3.4
Following the instructions, in shell, I set
Path=M:\R\Rtools-3.4\bin;M:\R\Rtools-3.4\gcc-4.6.3\bin;M:\R\R-3.4.3\bin;...
(the ... are other paths irrelevant for R/Rtools).
2008 Jul 04
1
initialize a matrix
Dear R users,
I'm trying to write a function which returns minimum,maximum,mean of a
vector(power)
I've done the following :
VAR<-function(power,length){
for(i in tml:length)){
tvar[i]<-i
pmean[i]<-mean(power[i:i+deltat])
pmin[i]<-min(power[i:i+deltat])
pmax[i]<-max(power[i:i+deltat])
varmax[i]<-100*(pmax[i]-pmean[i])/pmean[i]
2007 Feb 13
2
Computing stats on common parts of multiple dataframes
Folks,
I have three dataframes storing some information about
two currency pairs, as follows:
R> a
EUR-USD NOK-SEK
1.23 1.33
1.22 1.43
1.26 1.42
1.24 1.50
1.21 1.36
1.26 1.60
1.29 1.44
1.25 1.36
1.27 1.39
1.23 1.48
1.22 1.26
1.24 1.29
1.27 1.57
1.21 1.55
1.23 1.35
1.25 1.41
1.25 1.30
1.23 1.11
1.28 1.37
1.27 1.23
R> b
EUR-USD NOK-SEK
1.23 1.22
1.21 1.36
1.28 1.61
1.23 1.34
1.21 1.22
1998 Oct 16
3
mean and sd of each serial position
I want to do something like this in R. If I have three vectors
> a1
[1] 1 2 3
> a2
[1] 4 5 6
> a3
[1] 9 10 7
I want to compute
1. A vector that is the mean at each serial position of a1, a2, and a3.
so in this example it would have the contents
4.667, 5.667, 5.333333
2. A vector that is the SD at each serial position of a1, a2, and a3.
so in this example it would have the contents
2012 Jun 07
2
Basic question about confidence intervals
Hi,
I am again asking a generic question and the general response for such questions is cold. I am a beginner but use and write simple R scripts.
I am looking for some ideas to calculate the confidence intervals based on this excerpt from the paper. Moreover it would help if someone points to material to read about degrees of freedom and any related concepts.
Thanks,
2011 Nov 03
5
Is it possible to vectorize/accelerate this?
Dear Members,
I work on a simulaton experiment but it has an bottleneck. It's quite fast because of R and vectorizing, but it has a very slow for loop. The adjacent element of a vector (in terms of index number) depends conditionally on the former value of itself. Like a simple cumulating function (eg. cumsum) but with condition. Let's show me an example:
a_vec = rnorm(100)
b_vec = rep(0,
2017 Jul 09
1
Error in WGCNA package
Dear all ,
I would like to reconstruct coexpression networks from proteomic count data
having integer values. Some internal function doesn't like to work well
with integers. How can this error be rectified?
> adjacency = adjacency(datExpr, power = softPower, type = "signed");
Error in cor(datExpr, use = "p") :
REAL() can only be applied to a 'numeric', not a
2011 Jul 06
2
wgcna
Hi,
I'm running a tutorial ("Meta-analyses of data from two (or more) microarray data sets"), which use wgcna package. I have an error in the function modulePreservation (it is below).
I'm using R2.13
Can you help me? Do you know, what is happens?
Thanks
Raquel
multiExpr = list(A = list(data=t(badea)),B = list(data=t(mayo)))
# two independent datasets (dim = 13447 x 36)
mp =
2012 Oct 18
1
WGCNA: Combining block-wise dendrograms and modules into a single figure
Hello fellow R users,
I am currently learning to use R, so please forgive me if there is an
obvious explanation for the following problem. My goal is to perform WGCNA
on a dataset of 19776 genes, so I opted to follow the block-wise network
construction (Section 2c) in the WGCNA R Tutorial by Peter Langfelder and
Steve Horvath.
I ended up with 10 blocks and am able to plot the dendrograms and
2020 May 20
2
Precision of function mean,bug?
Hello R-dev,
Yesterday, while I was testing the newly implemented function pmean in
package kit, I noticed a mismatch in the output of the below R expressions.
set.seed(123)
n=1e3L
idx=5
x=rnorm(n)
y=rnorm(n)
z=rnorm(n)
a=(x[idx]+y[idx]+z[idx])/3
b=mean(c(x[idx],y[idx],z[idx]))
a==b
# [1] FALSE
For idx= 1, 2, 3, 4 the last line is equal to TRUE. For 5, 6 and many
others the difference is small
2010 Sep 29
1
cor() alternative for huge data set
Hi,
I am have a data set of around 43000 probes(rows), and have to calculate correlation matrix. When I run cor function in R, its throwing an error message of RAM shortage which was obvious for such huge number of rows. I am not getting a logical way to cut off this huge number of entities, is there an alternative to pearson correlation or with other dist() methods calculation(euclidean) that
2016 Jan 29
3
Validate Ids Multiple DC
Lol...
I dont know.. and i did learn know most from you :-P
And you have reset the idmap?
Greetz,
.. hihi...
Louis
> -----Oorspronkelijk bericht-----
> Van: samba [mailto:samba-bounces at lists.samba.org] Namens Rowland penny
> Verzonden: vrijdag 29 januari 2016 16:22
> Aan: samba at lists.samba.org
> Onderwerp: Re: [Samba] Validate Ids Multiple DC
>
> On 29/01/16
2008 Apr 27
1
parallel max, min, and median of dataframe columns
Hello, all,
I have a dataframe of three rows and umpteen columns. I want to show the
maximum, minimum, and median with a vertical line and a central dot (I'd
use a boxplot, but with only three data points, that's overkill; I can't
just use points, because of overlap and some of the other data plotted on
the graph).
This works:
> boxplot(data_frame,
2016 Aug 01
2
Centos 7 & ntlm
Hihi
So I have a really strange problem. I am running Centos 7 with Samba purely
for ntlm_auth against winbind services (squid/radius auth etc). Its been
working fine till we found a strange bug with the ntlm_auth executable.
If the username has a "w" at the end it throws out a syntax error
see below test:
# ./ntlm_auth --username=lblaauw
username must be specified!
Usage: