similar to: access sublists by a variable

Displaying 20 results from an estimated 600 matches similar to: "access sublists by a variable"

2006 May 23
2
transpose dataset to PC-ORD?
Hello: I need to take a species-sample matrix and transpose it to the format used by PC-ORD for analysis. Unfortunately, the number of species is very large (>5000), and so this operation cannot be performed simply in an application like Excel, which has a 255 column limit. So, I wrote relatively simple code in R that I hoped would do this (appended below). But there are glitches. The
2006 Jan 08
5
parse error in database.yml
Since upgrading to rails 1.0 I keep getting a parse error in database.yml. I have tried multiple configurations of both mysql and postgres and continue getting this error message when trying to generate a model or scaffold. -Andrew
2013 Oct 26
1
Compare two lists, with their sublists that have same structure
Dear all, I would like to ask your help concering two R lists. If I did everything should have the same structure (that means the same number of sublists, and their sublists also the same number of sublists). What would change between the two lists is the contents of each element in the lists. Could you please help me understand how I can do that in R? I would like to thank you in advance for
2017 Mar 20
1
win7 DC logon waiting
Hi, I've installed samba 4.5.3 as a domain controller and provisioned a domain. Now I'm integrating the win7 machines as clients. If the clients are in the network, all is ok. But if I use a notebook in a different network (for example at home) the win7 logon takes a very long time up to 2-3 minutes. If I disconnect all network connections, the login is as fast as in the domain network.
2006 Jan 09
3
two y-axis in xy-plot
Hi there, I am wondering if it is possible to do an xyplot with two y-axes. I'd like to print two parameters in a time series but they both have different scales. Which parameter in xyplot can I add to achieve this result? Thanks a lot for any help. Antje [[alternative HTML version deleted]]
2008 Dec 16
6
Find all numbers in a certain interval
Hi all, I'd like to know, if I can solve this with a shorter command: a <- rnorm(100) which(a > -0.5 & a < 0.5) # would give me all indices of numbers greater than -0.5 and smaller than +0.5 I have something similar with a dataframe and it produces sometimes quite long commands... I'd like to have something like: which(within.interval(a, -0.5, 0.5)) Is there anything I
2011 Feb 11
2
fitdistr question
Hello, I tried to fit a poisson distribution but looking at the function fitdistr() it does not optimize lambda but simply estimates the mean of the data and returns it as lambda. I'm a bit confused because I was expecting an optimization of this parameter to gain a good fit... If I would use mle() of stats4 package or mle2() of bbmle package, I would have to write the function by myself
2006 Nov 01
4
extract values from a vector
Hello, I'm looking for a solution for the following problem: I have two vectors V1 <- c("apple","honey","milk","bread","butter") V2 <- c("bread","milk") now, I would like to know for each element in V1 if it's equal to one of the elements in V2 I could do: which(V1 == V2[1] | V1 == V2[2]) but what if I
2009 Jan 20
5
from matrix to data.frame
Hello, I have a question how to reshape a given matrix to a data frame. # ---------------------------------- > a <- matrix(1:25, nrow=5) > a [,1] [,2] [,3] [,4] [,5] [1,] 1 6 11 16 21 [2,] 2 7 12 17 22 [3,] 3 8 13 18 23 [4,] 4 9 14 19 24 [5,] 5 10 15 20 25 > colnames(a) <- LETTERS[1:5] > rownames(a) <-
2009 Sep 28
2
Levelplot without margins
Hello, I'm not very experienced with lattice and I was wondering whether I get get some hints from you how to create a pure heatmap (using levelplot), without any axis, title, legend, margin at all... I just want to see the coloured squares, nothing else. Any suggestions? Antje
2008 Dec 05
6
levels update
Hello, I hope this question is not too stupid. I would like to know how to update levels after subsetting data from a data.frame. df <- data.frame(factor(c("a","a","c","b","b")), c(4,5,6,7,8), c(9,1,2,3,4)) names(df) <- c("X1","X2","X3") my.sub <- subset(df, X1 == "a" | X1 == "b")
2009 May 05
3
Heatmap without levelplot
Hi there, as I'm not sure to understand the coloring levelplot uses, I'm looking for another easy way to create a heatmap like this: library(lattice) mat <- matrix(seq(1,5, length.out = 12), nrow = 3) mat[1,2] <- 3.5 my.at <- seq(0.5,5.5, length.out = 6) my.col.regions <- rainbow(5) graph <- levelplot(t(mat[nrow(mat):1, ] ), at = my.at, col.regions = my.col.regions)
2008 May 23
2
Boxplot width
Hi there, assume that you have data with different sampling like d1 <- rnorm(100) d2 <- rnorm(150) now, I'd like to create two boxplots in one graph but each plot located at the sampling number at the x-axis. This, I can do with "at" l <- list(d1,d2) boxplot(l, at=c(length(d1), length(d2)), xlim=c(0,200) ) but both plots are very thin and I'd like to increase the
2008 Nov 16
4
duplicate values
Hei R Users, i have the following dataframe: Datetime Temperature and many more collumns 1 2008-6-1 00:00:00 5 2 2008-6-1 02:00:00 5 3 2008-6-1 03:00:00 6 4 2008-6-1 03:00:00 0 5 2008-6-1 04:00:00 6 6 2008-6-1 04:00:00 0 7 2008-6-1 05:00:00 7 8 2008-6-1 06:00:00
2011 Feb 21
2
Console output
Hi there, I though there has been a possibility to force the output on the console with one element per line. Instead of this: > 1:10 [1] 1 2 3 4 5 6 7 8 9 10 something like this > 1:10 [1] 1 [2] 2 [3] 3 [4] 4 [5] 5 [6] 6 [7] 7 [8] 8 [9] 9 [10] 10 Can anybody help? Antje
2008 Dec 02
3
boxplot via plot command
Hi folks, I've just discovered that the following code leads to boxplot (surprisingly to me). Can anybody explain to me why? Is this documented somewhere? I've never consider this option before. x <- rnorm(300) l <- c(rep("label1",100), rep("label2",50), rep("label3",150)) df <- data.frame(as.factor(l), x) plot(df) Thank you! Antje
2005 Nov 21
3
Comparing rows of matrices with different dimensions
Hi there, I have a question, which I thought is very easy to solve, but somehow I can't find a solution. Probably someone could help me quickly? Here it is: I have two matrices: a [,1] [,2] [,3] [1,] 1 4 9 [2,] 2 6 10 [3,] 3 6 11 [4,] 4 8 12 b [,1] [,2] [1,] 1 4 [2,] 2 5 [3,] 3 6 Now I want to find
2008 Sep 07
4
XML - get node by name
Hi there, I try to rewrite some Java-code with R. It deals with reading XML files. I started with the XML package. In Java, I had a very useful method which gave me a node by using: name of the node index of appearance start point: global (false) / local (true) So, I could do something like this. setCurrentChildNode("data", 0); getValueOfElement("val",1,true); -->
2008 Sep 01
3
another histogram question
Hi there, I hope this question is not as stupid as the one before ... I tried to shorten my histogram (because the distribution is quite skewed and I simply don't want to see the long tail but still use the histogram plot). How can I do something like this? (The example does not work but I don't know why...) data <- rnorm(100) # as example, of course this is not skewed... h <-
2007 Aug 24
2
Package installation
Hello, I'm running R with windows. Could anybody help me how to install the package biOps (http://cran.mirroring.de/src/contrib/Descriptions/biOps.html) ? I cannot find it at any mirror provided by the GUI; I just found it as "tar.gz" which cannot be installed with the installation method... Maybe, I simply do something wrong? Thanks for any hint! Antje