Displaying 20 results from an estimated 4000 matches similar to: "subsetting a list of dataframes"
2011 Aug 23
1
subsetting a list of matrices
Hi all,
I have an object that looks (roughly) like the following:
l <- list(a = matrix(rnorm(9), 3), b = matrix(rnorm(9), 3), c =
matrix(rnorm(9), 3))
l$a[3,] <- sample(c("Message 1", "Message 2", "Message 3"))
l$b[3,] <- sample(c("Message 1", "Message 2", "Message 3"))
l$c[3,] <- sample(c("Message 1",
2010 Nov 15
2
rotate column names in large matrix
Dear List,
I have a large (1600*1600) matrix generated with symnum, that I am using to
eyeball the structure of a dataset.
I have abbreviated the column names with the abbr.colnames option. One way
to get an even more compact view of the matrix would be to display the
column names rotated by 90 degrees.
Any pointers on how to do this would be most useful. Any other tips for
displaying the
2011 Oct 03
1
function recode within sapply
Dear List,
I am using function recode, from package car, within sapply, as follows:
L3 <- LETTERS[1:3]
(d <- data.frame(cbind(x = 1, y = 1:10), fac1 = sample(L3, 10,
replace=TRUE), fac2 = sample(L3, 10, replace=TRUE), fac3 = sample(L3,
10, replace=TRUE)))
str(d)
d[, c("fac1", "fac2")] <- sapply(d[, c("fac1", "fac2")], recode,
"c('A',
2010 Nov 11
1
exploratory analysis of large categorical datasets
Dear List,
I am looking to perform exploratory analyses of two (relatively) large
datasets of categorical data. The first one is a binary 80x100 matrix, in
the form:
matrix(sample(c(0,1),25,replace=TRUE), nrow = 5, ncol=5, dimnames = list(c(
"group1", "group2","group3", "group4","group5"), c("V.1", "V.2", "V.3",
2010 Nov 19
1
negative axis values in image() and scalebar in cor.plot() {psych}
Dear List,
I sent a related message yesterday, but did not receive it through the
mailing list; on the R-help archives it reads as "An embedded and
charset-unspecified text was scrubbed...". So here it is again, with the
(little) progress I have made since then. Any help would be greatly
appreciated!
I am working with a relatively large correlation matrix (~1600*1600), which
I am
2010 Nov 24
1
diverting output from nested loops
Dear List,
I have a series of nested loops with the structure shown below, and I am
struggling to figure out how to divert output to folders created with
dir.create() within the loops.
What I need is for the output to end up as topNameK/subNameL/objNameM.pdf;
what I get instead is a series of directories topNameK/, directories
subNameL/, and files objNameM.pdf, all in the working directory. Any
2011 Jun 05
2
kronecker sum
Dear All,
Could someone please suggest how to find the Kronecker sum of two 2x2
matrices,
i.e. given two matrices:
-A A
a -a
and
-B B
b -b
I need:
-A-B A B 0
a -a-B 0 B
b 0 -A-b A
0 b a -a-b
Many thanks,
Lara
[[alternative HTML version deleted]]
2012 Feb 28
2
from data.frame to Venn diagram
Hello All,
I have a data.frame with this structure:
m <- matrix(sample(c(rep('yes', 10, replace = TRUE), rep('no', 10,
replace = TRUE), NA), 500, replace = TRUE), nrow = 100, ncol = 5)
colnames(m) <- colnames(m, do.NULL = FALSE, prefix = "col")
m <- as.data.frame(m)
I need to generate a Venn diagram from this data.frame, displaying the
various intersections of
2011 Jan 12
2
syntax for extending a line in a script??
Hello,
A hopefully simple question. I use 'R' through emacs, but I suspect the
following would occur with any manner of text editor:
- my editor has a normally quite handy feature where it will
automatically indent to the appropriate level when I start a new line.
However, this occasionally creates cases where there is no friendly way to
break a long line of code into
2011 May 13
2
Creating dataframes
I would like to create a certain number of dataframes out of one dataframe
where each of the dataframes
is related to a factor. This should be possible with a loop or a function,
as is very clumsy to do it manually
when there are quite a lot factors.
For example having a dataframe called "exmpl":
Site Value
1 12
1 15
1 18
1 21
1 12
1 13
2 15
2 12
2 58
2 62
2 22
2 65
2 29
3 21
3 55
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
2002 May 15
1
Permission problems with samba 2.2.x
Hello,
Sometimes I have to create and use Navision Databases on samba shares - this
works with samba 2.0.x but does not with samba 2.2.x (tried 2.2.3a and 2.2.4).
The following tests were done with a acl enabeled samba and an acl aware
kernel/filesystem, but I also have done these tests with acl not compiled into
samba on an host without acl in the kernel - same result, does not work, same
2003 Sep 22
1
Data frame from list of lists
This seems to be a simple problem, and I feel that there ought to be a
simple answer, but I can't seem to find it.
I have a function that returns a number of values as a heterogeneous list -
always the same length and same names(), but a number of different data
types, including character. I want to apply it to many inputs, resulting in
a list of lists.
I would like to turn this list of
2008 Sep 03
2
ANCOVA/glm missing/ignored interaction combinations
Hi
I am using R version 2.7.2. on a windows XP OS and have a question
concerning an analysis of covariance with count data I am trying to do,
I will give details of a scaled down version of the analysis (as I have
more covariates and need to take account of over-dispersion etc etc) but
as I am sure it is only a simple problem but I just can't see how to fix
it.
I have a data set with count
2009 Jul 23
3
How to perform a calculation in each element of my list?
Hi R-helpers,
I have a list containing 10 elements, each of which is a dataframe. I wish
to add a new column to each list element (dataframe) containing the product
of the last two columns of each dataframe.
I'd appreciate any pointers, thanks!
Mark Na
[[alternative HTML version deleted]]
2013 Feb 22
4
HELP!!!
I am sorry to bug you, I am having this error whenever I want to run
random effects regression in software R: Error in if (sigma2$id < 0)
stop(paste("the estimated variance of the", :
missing value where TRUE/FALSE needed.
Please help me look into it.
[[alternative HTML version deleted]]
2015 Jun 16
4
Ayuda boxplot ggplot2
Hola a todos
Me gustaría saber si me pueden ayudar con lo siguiente.
Realicé un Boxplot usando ggplot2 para visualizar el comportamiento de dos
variables. Visualmente no se notan las diferencias porque la gráfica de la
derecha (parásitos en el abdomen) llega hasta 20 en el eje y. ¿Cómo puedo
hacer para que las dos gráficas muestren la misma escala en el eje Y, es
decir, que las dos lleguen a 60?
2003 Feb 16
2
[Bug 51] Supplying more than 8 ports to connection tracking triggers unusual system behavior
https://bugzilla.netfilter.org/cgi-bin/bugzilla/show_bug.cgi?id=51
laforge@netfilter.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WORKSFORME
------- Additional Comments From
2017 Jun 21
1
Cross-Validation for Zero-Inflated Models
Lara:
I see you sent this email to the R helpdesk a really long time ago, but I was just wondering if you ever got an answer to this question. I was just thinking that I would build my own cross validation function, but if you figured out a way to do this automatically, could you let me know?
Thanks,
Eric Weine.
2009 Jun 24
1
Random Forest Variable Importance Interpretation
Hi
I am trying to explore the use of random forests for regression to
identify the important environmental/microclimate variables involved in
predicting the abundance of a species in different habitats, there are
approx 40 variable and between 200 and 500 data points depending on the
dataset. I have successfully used the randomForest package to conduct
the analysis and looked at the %IncMSE