Displaying 20 results from an estimated 400 matches similar to: "index to select rows of a large matrix"
2009 May 22
1
Paste Strings as logical for functions?
Dear R Users,
I have some dynamic selection rules that I want to pass around for my functions:
>rules <- paste(g$TrialList==1 & g$Session==2)
>myfunction <- function(rules) {
> index <- which(rules)
> anotherFunction(index)
> }
However, I can't find a way to pass around these selection rules
easily (for subset, for which, etc)
Please let me know if you have
2008 Dec 08
3
Transforming a string to a variable's name? help me newbie...
Dear all,
I'm a newbie in R.
I have a 45x2x2x8 design.
A dataframe stores the metadata of trials. And each trial has its own
data file: I used "read.table" to import every trial into R as a
dataframe (variable).
Now I dynamically ask R to retrieve trials that fit certain selection
criteria, so I use "subset", e.g.
tmptrialinfo <- subset(trialinfo, (Subject==24 &
2009 Apr 22
4
read.table or read.csv without row index?
Hello all,
Probably my concepts about the data.frame and matrix and array in R
are not clear, I need some clarification to help me understand them
better.
>M <- read.table("test1.csv",sep=",",row.names=NULL,header=T)
gives me: M as
M1 M2 M3 M4 M5 M6 M7 M8 M9 M10
1 9 11 14 15 18 20 20 20 20 20
2 3 4 8 9 11 12 14 15 15 15
3 4 5 8 8 9 9 9 9 9 9
4 4
2009 May 20
2
Too large a data set to be handled by R?
Dear R users,
I have been using a dynamic data extraction from raw files strategy at
the moment, but it takes a long long time.
In order to save time, I am planning to generate a data set of size
1500 x 20000 with each data point a 9-digit decimal number, in order
to save my time.
I know R is limited to 2^31-1 and that my data set is not going to
exceed this limit. But my laptop only has 2 Gb and
2009 May 19
2
Replace / swap values of subset of a data.frame
Dear R users,
I have 1 data.frame of 1500x80 - data1. I found out that there are a
few cells of data that I have misplace, and I need to fix the ordering
of them.
In an attempt trying to swap column 22 & 23 of the Subject with
misplaced data, I did the following:
> data2 <- data1
> subset(data1,(Subject==25 & Session==1))[,22] <- subset(data2,(Subject==25 &
2009 Jun 01
3
Within Subject ANOVA question
Dear R users,
I have copied for following table from an article on "Using confidence
intervals in within-subject designs":
Subject 1sec 2sec 5sec
1 10 13 13 12.00
2 6 8 8 7.33
3 11 14 14 13.00
4 22 23 25 23.33
5 16 18 20 18.00
6 15 17 17 16.33
7 1 1 4 2.00
8 12 15 17 14.67
9 9 12 12 11.00
10 8 9 12 9.67
I rearranged the data this way:
2008 Dec 11
3
Resampling physiological data using R?
Dear all R users,
I am going to use R to process some of my physiological data about eye.
The problem is the recording machine does not sample in a reliably
constant rate: the time intervals between data sampled can vary from
9msec to ~120msec, while most around in the 15-30msec range.
The below is a fraction of a single data file of a trial:
Time CursorX CursorY Pupilsize
1811543 -1 -1 -1
2008 Dec 15
2
cannot allocate vector of size... restructuring suggestion please...
Dear R Users,
I was running some data analysis scripts and ran into this error:
Error: cannot allocate vector of size 27.6 Mb
Doing a "memory.size(max=TRUE)" will give me:
[1] 1506.812
The current situation is:
I'm working on a Windows Vista 32bit laptop with 4GB RAM (effectively
3GB I assume...)
I have a data file of 450Mb loaded into R and have around 1500
data.frames floating
2011 Dec 12
4
Improve a browse through list items - Transform a loop to apply-able function.
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?...
Nom : non disponible
URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20111212/5611c696/attachment.pl>
2005 May 24
1
Contingency tables from data.frames
Dear list,
I'm trying to do a set of generic functions do make contingency tables from
data.frames. It is just running "nice" (I'm learning R), but I think it can be
better.
I would like to filter the data.frame, i.e, eliminate all not numeric variables.
And I don't know how to make it: please, help me.
Below one of the my functions ('er' is a mention to EasieR,
2005 Jul 07
1
Tables: Invitation to make a collective package
Hi All,
I would like to make an invitation to make a collective package with all
functions related to TABLES.
I know that there are many packages with these functions, the original idea is
collect all this functions and to make a single package, because is arduous for
the user know all this functions broadcast in many packages.
So, I think that the original packages can continue with its
2015 Jul 23
2
[LLVMdev] [LLD] support for dlltool generated libs in COFF/PECOFF
Hi again rui, :)
I've got all the patches into llvm and clang for supporting mingw-w64 via
compiler-rt and now we are able to build a full mingw-w64 toolchain without
gcc :)
With great help from yaron and rnk.
I've CC'd them as they might have interest in seeing this target through
with me to the end :)
So I have again turned my attention to LLD so that we can also remove ld as
a
2008 Sep 09
1
How do I compute interactions with anova.mlm ?
Hi,
I wish to compute multivariate test statistics for a within-subjects repeated measures design with anova.mlm.
This works great if I only have two factors, but I don't know how to compute interactions with more than two factors.
I suspect, I have to create a new "grouping" factor and then test with this factor to get these interactions (as it is hinted in R News 2007/2),
but
2010 Jan 03
1
Anova in 'car': "SSPE apparently deficient rank"
I have design with two repeated-measures factor, and no grouping
factor. I can analyze the dataset successfully in other software,
including my legacy DOS version BMDP, and R's 'aov' function. I would
like to use 'Anova' in 'car' in order to obtain the sphericity tests
and the H-F corrected p-values. I do not believe the data are truly
deficient in rank. I
2009 Apr 11
1
Error in R CMD check 2.8.1
Env: R 2.8.1, Win Xp, Eclipse/StatET
In a .Rd file, I have an example containing the lines:
# calculate Y M, using polynomial contrasts
trends <- as.matrix(VocabGrowth) %*% poly(8:11, degree=3)
colnames(trends)<- c("Linear", "Quad", "Cubic")
[At the risk of a long message, I'll append the complete .Rd file at the
end of this message, in case this was
2010 May 06
1
How to solve: Error with Anova {car} due to "deficient rank" ?
Hello all,
I am getting the following error:
Error in linear.hypothesis.mlm(mod, hyp.matrix.1, SSPE = SSPE, V = V, :
The error SSP matrix is apparently of deficient rank = 7 < 11
After running:
mod.ok <- lm(as.matrix(dat[,-1]) ~ DC, data=dat)
(av.ok <- Anova(mod.ok, idata=idata, idesign=~week))
Although if I jitter the data in "dat", the function seems to work.
What
2009 Feb 19
2
read.table : how to condition on error while opening file?
Hi,
I'm using read.table in a loop, to read in multiple files. The problem
is that when a file is missing there is an error message and the loop is
broken; what I'd like to do is to test for the error and simply do
"next" instead of breaking the loop. Anybody knows how to do that?
Example:
filelist <- c("file1.txt", "file2.txt",
2013 Feb 15
3
lattice 3x3 plot: force common y-limits accross rows and align x-axes
Good afternoon,
I would like to ask for help in controlling y-axis limits and labels in
lattice doplots. Unfortunately, the problem is somewhat convoluted,
please bear with the long explanation.
I would like to create a 3x3 lattice of dotplots, say subject ~ count.
The plot is conditioned on variables treatment and risk: subject ~ count
| treatment + risk. In the experiment, not all subjects
2009 Feb 18
2
[package-car:Anova] extracting residuals from Anova for Type II/III Repeated Measures ?
Hello dear R members.
I have been learning the Anova syntax in order to perform an SS type III
Anova with repeated measures designs (thank you Prof. John Fox!)
And another question came up: where/what are the (between/within) residuals
for my model?
############ Play code:
phase <- factor(rep(c("pretest", "posttest", "followup"), c(5, 5, 5)),
2008 Sep 17
1
Question about panel.points
Hello,
I'm trying to plot graphs using lattice with this script :
xyplot(Y ~ X | factmod,
panel = function(x, y) {
panel.grid(h=-1, v=-1, col="gray")
panel.xyplot(x, y, type="p", pch=20)
panel.points(50,Idata, data=devdata, col="red") ----->
this doesn't work
},