Displaying 20 results from an estimated 7000 matches similar to: "Generalised rbind/cbind"
2011 Jan 20
1
syntax for a list of components from a list
I'm attempting to generalise a function that reads individual list components, in this case they are matrices, and converts them into 3 dimensional array. I can input each matrix individually, but want to do it for about 1,000 of them ...
This works
array2 <- abind(list1[[1]],list1[[2]],list1[[3]],along=3)
This doesn't
array2 <- abind(list1[[1:3]],along=3)
This doesn't either
2009 Oct 19
1
rbind to array members
(resent as hotmail really cannot format plaintext, but I've just read
Tony Plate's message that what I'd like to do might not be possible)
>
> library(abind) ## array binding
I've looked into using abind() but it seems I might not understand it properly.
I can build my 2 table array and insert a row into each table using:
x <- array(0,c(1,3,2))
x[,,1]
2009 Sep 03
5
abind, but on lists?
I'm trying to massage some data from Matlab into R. The matlab file
has a "struct array" which when imported into R using the R.matlab
package, becomes an R list with 3+ dimensions, the first of which
corresponds to the structure fields, with corresponding row names, and
the second and third+ dimensions correspond to the dimensions of the
original struct array (as matlab
2005 Mar 28
2
Generating list of vector coordinates
Hi.
Can anyone suggest a simple way to obtain in R a list of vector
coordinates of the following form? The code below is Mathematica.
In[5]:=
Flatten[Table[{i,j,k},{i,3},{j,4},{k,5}], 2]
Out[5]=
{{1,1,1},{1,1,2},{1,1,3},{1,1,4},{1,1,5},{1,2,1},{1,2,2},{1,2,3},{1
,2,4},{1,2,
5},{1,3,1},{1,3,2},{1,3,3},{1,3,4},{1,3,5},{1,4,1},{1,4,2},{1,4,3},
{1,4,
2009 Oct 15
2
plotting/examining residuals of a mixed generalised linear model
Dear R users,
I'm hoping that more experienced users will be able to assist me in
examining the model fit of a mixed generalised linear model. The example
using the data 'bacteria' within the MASS package will hopefully illustrate
what I would like to acheive;
library(MASS)
library(nlme)
attach(bacteria) # y being output and the trt - treatment group being an
explanatory variable.
2010 Dec 14
2
Use generalised additive model to plot curve
Readers,
I have been reading 'the r book' by Crawley and think that the
generalised additive model is appropriate for this problem. The
package 'gam' was installed using the command (as root)
install.package("gam")
...
library(gam)
> library(gam)
Loading required package: splines
Loading required package: akima
> library(mgcv)
This is mgcv 1.3-25
Attaching
2012 Mar 13
1
Visualising multiple response contingency tables
Dear R Help Community,
I have a question and an answer (based on reading this forum and online
research), but I though I should share both since probably there's a much
better way to go about my solution. My question is specifically about how
to best visualise multiple response contingency tables. What I mean by
'multiple response' is that the total number of responses per row of a
2011 Apr 11
3
multiple comparisons with generalised least squares
Dear R users,
I have used the following model:
M1 <- gls(Nblad ~ Concentration+Season + Concentration:Season, data=DDD,
weights=varIdent(form=~ 1 | Season*Concentration))
to assess the effect of Concentration and Season on nitrogen uptake by
leaves (Nblad). I accounted for the difference in variance across the factor
levels by using the varIdent function.
Then I wanted to perform multiple
2003 Oct 21
5
do.call() and aperm()
Hi everyone
I've been playing with do.call() but I'm having problems understanding it.
I have a list of "n" elements, each one of which is "d" dimensional
[actually an n-by-n-by ... by-n array]. Neither n nor d is known in
advance. I want to bind the elements together in a higher-dimensional
array.
Toy example follows with d=n=3.
f <-
2004 Oct 01
2
multiple dimensional diag()
Hi
I have two arbitrarily dimensioned arrays, "a" and "b", with
length(dim(a))==length(dim(b)). I want to form a sort of
"corner-to-corner" version of abind(), or a multidimensional version
of blockdiag().
In the case of matrices, the function is easy to write and if
a=matrix(1,3,4) and b=matrix(2,2,2), then adiag(a,b) would return:
[,1] [,2] [,3] [,4] [,5]
2010 Jun 22
1
Generalised Estimating Equations on approx normal outcome with limited range
Dear R users
I am analysing data from a group of twins and their siblings. The measures
that we are interested in are all correlated within families, with the
correlations being stronger between twins than between non-twin siblings.
The measures are all calculated from survey answers and by definition have
limited ranges (e.g. -5 to +5), though within the range they are
approximately normally
2008 Feb 12
1
Finding LD50 from an interaction Generalised Linear model
Hi,
I have recently been attempting to find the LD50 from two predicted fits
(For male and females) in a Generalised linear model which models the effect
of both sex + logdose (and sex*logdose interaction) on proportion survival
(formula = y ~ ldose * sex, family = "binomial", data = dat (y is the
survival data)). I can obtain the LD50 for females using the dose.p()
command in the MASS
2006 Nov 23
2
loading libraries on MPI cluster
Dear R-users,
we are using library(snow) for computation on a linux cluster with RMPI.
We have a problem with clusterEvalQ: after launching clusterEvalQ it seems
loading the required library on each node but if we type a function
belonging to the loaded package R doesn't find it.
> library(snow)
# making cluster with 3 nodes
> cl <- makeCluster(3, type = "MPI")
Loading
2002 Mar 13
1
several bugs (PR#918) lists and matrices
### I got bit again by the same bugs I wrote about a year ago.
### The bugs are related to matrices and arrays of lists.
### 1. There is a clear inconsistency in how R handles two
### functionally equivalent statements.
### array() is able to take a list and create a matrix.
### matrix() is unable to create that matrix.
> vector("list", 2)
[[1]]
NULL
[[2]]
NULL
>
2005 Apr 21
1
Installing packages from source code
Hi everybody,
I have trouble in installing packages from source code by following Section
5.1 in manual R-admin.pdf . I am using R 2.1.0 and Win NT.
Following the Windows toolset section in the manual, I download the tool
set package from: http://www.murdoch-sutherland.com/Rtools/tools.zip
and unzip under C:\tools
I also downloaded Perl (Windows Port) and installed it.
2011 Aug 12
1
install packages from intranet
Hi,
I'm new to R. Apologies if this is a simple query, I've searched the mailing lists and docs but can't find a solution to my problem.
I'm trying to make some packages available on our intranet. During development the 'intranet' is a webserver running on localhost.
* When I call "install.packages" I get a mesage about not being able to access 'index
2008 Oct 28
2
abind
I am trying to combine two arrays with different dimensions into one.
For example
The first one is
1 2 3
4 5 6
The second one is
7 8
9 10
The resulted one would be like
, , 1
1 2 3
4 5 6
, , 2
7 8
9 10
I used abind to do this, but failed. Could somebody please let me
know how to do this in R? Thanks so many.
Suyan
2009 Oct 18
2
rbind to array members
Hi,
I would like to add rows to arbitrary tables within a 3dimensional array.
I can directly add data to an existing row of a table:
> x <- array(0,c(1,3,2))> x[,,1] <- c(1,2,3)
And I can even add a row to the table and assign to another object.
> y <- rbind(x[,,1], c(4,5,6))
and 'y' is what I want it to be:> y?? ? [,1] [,2] [,3][1,] ? ?1 ? ?2 ? 3[2,] ? ?4 ? ?5 ? 6
but
2008 Oct 16
1
packages in Depends field and NAMESPACES
Must packages in the Depends field of the DESCRIPTION file have
NAMESPACES? I haven't seen this explicitly indicated anywhere.
I am writing a small package and find that when I add the abind
package to the list of the Depends field, I get an error in
R CMD check of the build.
* checking package name space information ... OK
* checking package dependencies ... ERROR
Packages required but not
2013 Jun 26
0
Generalised Linear models in R-Studio
Hello,
I would like some help with my Generalised Linear Model in R-Studio
I am a little confused about what family to use and for my data
My outcome variable (response) is categories 0,1,2,3 but my data i dont have any individuals that have fallen into the top group "3"
What i have read about Generalised Models is that Biomial data is only two option not the 4 that i have.
What