Displaying 20 results from an estimated 30000 matches similar to: "Working with lists"
2003 Mar 14
2
R "FinMetrics" Package Available?
Hello List,
I've done some cursory searching but (so far) have struck out. Does
anyone know if the R version of the S+ FinMetrics package is available?
Best,
Bill Vedder
2002 Jul 22
3
Vector Manipulation
Greetings,
I wonder if someone could point me towards a more elegent solution than
what I"ve kluged together. I have a vector "samp1" of 296 integers.
They are sorted in ascending order and the numbers range from 177 to
228,953. I'd like to specify N non-overlapping intervals covering the
range from 0 to 229,354 and then for each range, count the number of
integers from samp1
2011 Feb 17
0
Multi-response MCMCglmm (gaussian and zapoisson)
Dear MCMCglmm users,
I am currently struggling with the specification of a proper prior and model formula for a multi-response MCMCglmm with two of the three response variables being Gaussian and the third being za-poisson. The model includes several fixed effects and three nested random effects.
In general, I would prefer to fit a model with a fixed effect of trait and suppressed intercept for
2011 May 30
0
2D random walk with traps convert C++ code to R code
Hello, I have a C++ code for 2D random walks with traps and I want to convert it in a R code with its syntaxs, can anyone help???????
It's easy for me to adapt the body but I want help with the beginig (variable declaration) and th end exporting the output to a file ( like write.table() or sink() )
Thank you...
#include <iostream>
#include <math.h>#include
2001 Nov 11
2
3D Plots
Good Evening,
I'm using R1.2.1. Is 3D plotting available? The only reference I find
is to "plot.locfit.3d {locfit}" and the documentation says the function
is not currently available in R.
Any help is appreciated.
Best Regards,
Bill Vedder
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2008 May 14
6
PWGL in wine, problems
Hello,
I'm new on this list. First of all, thank you to all the developers of this
great project!
At the moment there is only an application that keeps me on both macos and
windows, its name is PWGL a free environment for computer assisted
composition in openGL. (http://www2.siba.fi/PWGL/)
I'm running Ubuntu 8.04 and wine 0.9.59.
I have to say that I also installed vcrun2005 and
2011 Dec 14
0
hclust and ggplot2
I saw an example online of taking hclust dendrogram and plotting it using
ggplot2 and thought I would give it a try to see what it would look like. I
get an error when trying to use ggplot; Error: ggplot2 doesn't know how to
deal with data of class phylo. Regular plot works fine but I can't get
ggplot2 to work.
see code below....
rows=100
columns=100
#create matrix
2001 Aug 28
1
Help with Clustering Techniques in R
Greetings RListers,
I have a data set containing two types of outcomes; success and failure.
Associated with each outcome are 12 different measurements. I'm trying
to find out, for example, if some of the 12 measures are associated more
with success or failure or, if there's any relationship at all between
the measures and the outcomes (success or failure).
I don't have (as yet)
2012 Mar 09
1
extracting the i-th row of a matrix in a list of lists
Hi,
what is the proper of of "passing a missing value" so I can extract
the entire i-th row of a matrix (in a list of lists) without
pre-computing the number of cols?
For example, if I know that the matrices have 2 columns, I can do the following:
set.seed(1)
x0 <- lapply(1:10, function(i) replicate(4, list(matrix(rnorm(10), nc=2))))
lapply(lapply(x0, '[[', 3), '[',
2001 Dec 22
1
Saving Newly Created Functions
Greetings R-Listers,
Using R1.2.1 (yes, I know...)
I am writing my own functions and would like to know how save these for
use in subsequent R sessions. How does one do this?
Best,
Bill Vedder
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or
2010 Mar 26
3
Using lapply with two lists
Hello guys,
I have a list L1 of matrix. I have another list L2 with the same number of
elements representing the row of the L matrix that I want to delete
(L1[[i]][-L2[[i]],]) but I can't do this with lapply as it iterates through
L1 (first argument) and not L2. Any idea?
-----
Anna Lippel
--
View this message in context:
2012 Nov 09
1
Mean of matrices entries in list of lists
Hey there,
I've got a list of lists with matrices:
A list with 13 entries (representing years), each of them another list with
12 matrices (representing one month). In each matrix there are as many rows
as there are hours in the different months and 2 columns, since two
meteorological parameters are measured.
What I want to do is to calculate the hourly mean values for each month over
the
2012 Sep 11
1
lapply with different size lists?
Hello,
I have 2 functions (a and b)
a = function(n) { matrix (runif(n*2,0.0,1), n) }
>
>
> b = function (m, matrix) {
> n=nrow (matrix)
> p=ceiling (n/m)
> lapply (1:p, function (l,n,m) {
> inf = ((l-1)*m)+1
> if (l<p) sup=((l-1)*m)+m
> else sup=n
>
2013 Jan 08
4
Logical operator and lists
Hello R-Helpers,
I have a slight problem with the expresion data[data==""] <- NA which works
well for a data.frame. But now i must use the same for a list of
data.frames.
My idea is data[[]][data==""] but it donĀ“t work.
Thanks!!
Dominic
[[alternative HTML version deleted]]
2013 Jan 11
3
Access comonents in lists of lists
Dear R users,I have a list of equally structured lists, how can I access e.g.
all 2nd compontents in those sub-lists?An example:lst <-
list(rep(list(1:3),3), rep(list(4:6),3))> lst[[1]][[1]][[1]][1] 1 2
3[[1]][[2]][1] 1 2 3[[1]][[3]][1] 1 2 3[[2]][[2]][[1]][1] 4 5 6[[2]][[2]][1]
4 5 6[[2]][[3]][1] 4 5 6What I want to get are all second sub-lists, in this
case:[[1]][[2]][1] 1 2
2001 Dec 23
1
Time Series Data
Happy Holidays All,
I'm trying to use stl() to extract a seasonal component from a time
series. I believe the root cause of my problem lies in how I imported
the data into R.
In Excel (csv), the data look like:
Jan Feb Mar ....
1949 12.2 9.0 7.9 ....
1950 17.2 16.9 9.9 ....
1951 8.2 7.0 7.7 ....
I import to R using:
2007 Apr 09
3
do.call vs. lapply for lists
Hi All,
I'm trying to understand the difference between do.call and lapply for
applying a function to a list. Below is one of the variations of
programs (by Marc Schwartz) discussed here recently to select the first
and last n observations per group.
I've looked in several books, the R FAQ and searched the archives, but I
can't find enough to figure out why lapply doesn't do what
2004 Sep 16
5
Indexing lists
DeaR useRs:
I have a list with 500 elements, in each other there are data.frames and I
want to take the first row and the first column of each elements of my list
since the first to the 500-th.
Thanks and excuse my bad English.
---
[[alternative HTML version deleted]]
2009 Dec 11
4
extracting vectors from lists of lists
Good evening
I often have as output from simulations a list of various values, vectors
and matrices.
Supposing that I then run said simulation several times, I often want to
extract a particular result from each simulation for plotting and,
ideally, put it in a matrix.
A simple example
v1 <- 1:5
v2 <- 6:10
other1 <- "stuff"
other2 <- "stuff"
set1 <-
2009 Dec 01
2
apply on two lists?
x=list(a=c(1,2),b=c(3,4,5))
y=list(a=c(1,2),b=c(3,4,5))
lapply(seq(along=x),function(i){cbind(x[[i]],y[[i]])})
I need to apply some function on two lists. I have to use the index to
do as shown above. But I feel more natural to refer to the lists
without using the index (using the syntax of something like,
lapply(x,y, function(i,j){....})). I'm wondering if there is such a
thing in R? Or