Displaying 12 results from an estimated 12 matches similar to: "help writing for loop"
2017 Mar 20
1
Fwd: Possible memory problems with mallloc when called with .C()
Hello,
I'm trying to calculate a certain distance estimator for my thesis. I have a
program in C that works fine when I call it with .C() in R, but since
I'm dealing with big matrices like 30000x20000 it was getting a stack
overflow. Now I have the same program but more efficeintly coded using
malloc, and it works perfectlry in C, compiles well with R CMD SHLIB
but when I call it with
2007 Dec 31
1
help with matrix
Hi, dear all:
I am a beginner. I appreciate any help or hint from you.
I am trying to do calculation with matrices. I have 3 matrices. One is matrixA, 2nd is matrixB, and last is matrixC.
Here is matrixA:
1.8511.40.0831.001
0.8771.30.1161.33
1.9021.21.1020.302
0.8640.1261.110.252
1.8230.2161.0020.307
Next is matrixB:
0.8761.770.1930.328
0.8911.0090.2381.004
2005 Jul 20
2
Combining two matrices
Can someone please refer me to a function or method that resolves this
structuring issue:
I have two matrices with identical colnames (89), but varying number
of observations:
matrix A matrix B
217 x 89 16063 x 89
I want to creat one matrix C that has both matrices adjacent to one
another, where matrix A is duplicated many times to
2009 Jul 20
3
Write in file matrices of sifferent size
Hi list,
How to save a list content into a text file?
Please consider example below, I have two numeric matrices that I bundle into a list & give each list element a name
Example:
> matrixA <- matrix(0,5,4)
> matrixB <- matrix(1,7,13)
> matrixList <- list(matrixA,matrixB)
> names <- c("Matrix A","Matrix B")
> names <-
2006 May 22
2
Matrix in 3D
Dear R Users,
Is it possible to add another (third) index to matrix (as in MATLAB). For some analysis e.g. finite mixture models is necessary. Simple example
i<-3
matrix[, , i]<-matrixA[, ,i]%*%matrixB[, , i]
I would appreciate any help
Rob
2005 Oct 24
0
error messages in matrix multiplication
Hello,
I am hoping for some advice on using R - my experience with statistical
programs has been limited to SPSS.
I have been using a textual analysis program and wanted to add some rigour
to making a choice between two models of self-reported cannabis effects. To
do this, I need to compare the two resulting word co-occurence matrices.
The program itself,doesn't offer this as an option
2013 Nov 19
7
Quadrified GTX 480 VT-d passthrough. CUDA 5.5 in Linux partial success
Hi everyone,
after following in the footsteps of the following discussion
(http://lists.xenproject.org/archives/html/xen-users/2013-09/msg00106.html)
I had been able to turn my GTX 480 into a Quadro 6000. When I VT-d
passthrough it to a Debian jessie VM it shows up fine and CUDA 5.5
seems to function properly up to a point:
lspci -v:
00:04.0 VGA compatible controller: NVIDIA Corporation GF100GL
2008 Apr 13
0
[Fwd: Re: Assigning to multiple variables]
Scott Romans wrote:
> If we have a function that returns 2 or more values (such as dim as
> applied to a matrix), can we assign these 2 or more values to an equal
> number of differently named variables in one line? For example, is
> there any way to do something like this:
>
> [NumberRows NumberColumns] <- dim(MatrixA)
In that case R returns an object (a vector) with
2013 Nov 18
0
Quadrified GTX 480 VT-d passthrough. CUDA 5.5 in Linux partial success!
Hi everyone,
after following in the footsteps of the following discussion
(http://lists.xenproject.org/archives/html/xen-users/2013-09/msg00106.html)
I had been able to turn my GTX 480 into a Quadro 6000. When I VT-d
passthrough it to a Debian jessie VM it shows up fine and CUDA 5.5
seems to function properly up to a point:
lspci -v:
00:04.0 VGA compatible controller: NVIDIA Corporation GF100GL
2011 Feb 03
1
random sequences for rnorm and runif
Dear R experts,
For a fixed seed, the first random number produced by rnorm and runif
has the same rank within the distribution, which I find useful. The
following ranks differ, however.
> set.seed(123)
> runif(4)
[1] *0.2875775* 0.7883051 *0.4089769* 0.8830174
> set.seed(123)
> pnorm(rnorm(4))
[1] 0.2875775 0.4089769 0.9404673 0.5281055
I noticed that rnorm seems to
2011 Apr 04
3
How to speed up grouping time series, help please
I retrieve for a few hundred times a group of time series (10-15 ts
with 10000 values each), on every group I do some calculation, graphs
etc. I wonder if there is a faster method than what presented below to
get an appropriate timeseries object.
Making a query with RODBC for every group I get a data frame like this:
> X
ID DATE VALUE
14 3 2000-01-01 00:00:03 0.5726334
2005 Jun 08
6
Random seed problem in MCMC coupling of chains
Hello!
I am performing coupling of chains in MCMC and I need the same value
of seed for two chains. I will show demo of what I want:
R code, which might show my example is:
niter <- 3
nchain <- 2
tmpSeed <- 123
for (i in 1:niter) { # iterations
for (j in 1:nchain) { # chains
set.seed(tmpSeed)
a <- runif(1)
cat("iter:", i, "chain:", j,