Displaying 13 results from an estimated 13 matches for "laply".
Did you mean:
lapply
2012 Jan 24
1
List to Array: How to establish the dimension of the array
Given a variable aa in the workspace, some of its attributes are:
> typeof(aa)
[1] "list"
> mode(aa)
[1] "list"
> length(aa)
[1] 2
How do I retrieve the maximum indices, in this case 2,3,4? The variable itself is:
> aa
[[1]]
[[1]][[1]]
[[1]][[1]][[1]]
[1] 37531.52
[[1]][[1]][[2]]
[1] 62787.32
[[1]][[1]][[3]]
[1] 5503.184
[[1]][[1]][[4]]
[1] 33832.8
2012 Jun 05
1
Trouble with Functions
...l using source(). At any rate, when I read it
into the session using source I get errors and I can't find documentation on
what's wrong (or tell from the feedback). Hoping you can help!
/Implementing Our Sentiment Scoring Algorithm
To score each tweet, our score.sentiment() function uses laply() to iterate
through the input text. It strips punctuation and control characters from
each line using R?s regular expression-powered substitution function, gsub()
and uses match() against each word list to find matches:/
score.sentiment = function(sentences, pos.words, neg.words,
.progress=?none?...
2010 Aug 25
3
frequency, count rows, data for heat map
Hi all,
I have read posts of heat map creation but I am one step prior --
Here is what I am trying to do and wonder if you have any tips?
We are trying to map sequence reads from tumors to viral genomes.
Example input file :
111 abc
111 sdf
111 xyz
1079 abc
1079 xyz
1079 xyz
5576 abc
5576 sdf
5576 sdf
How may xyz's are there for 1079 and 111? How many abc's, etc?
2008 Sep 30
0
New package: plyr
...are named according to the type of object they input
(first letter) and output (second letter):
* llply = from a list to a list
* alply = from an array (or vector, or matrix) to a list
* ldply = from a list to a data.frame
* d_ply = from a data.frame, ignore output
* and so on for llply, laply, ldply, l_ply, alply, aaply, adply,
a_ply, dlply, daply, dply, d_ply
plyr also provides:
* m*ply which works in a similar way to mapply
* r*ply which works in a similar way to replicate
You can find out more at http://had.co.nz/plyr/, including a 20 page
introductory guide, http://had.co.nz/...
2008 Sep 30
0
New package: plyr
...are named according to the type of object they input
(first letter) and output (second letter):
* llply = from a list to a list
* alply = from an array (or vector, or matrix) to a list
* ldply = from a list to a data.frame
* d_ply = from a data.frame, ignore output
* and so on for llply, laply, ldply, l_ply, alply, aaply, adply,
a_ply, dlply, daply, dply, d_ply
plyr also provides:
* m*ply which works in a similar way to mapply
* r*ply which works in a similar way to replicate
You can find out more at http://had.co.nz/plyr/, including a 20 page
introductory guide, http://had.co.nz/...
2011 May 12
2
group length
Hi
I have four groups
y1=c(1.214,1.180,1.199)
y2=c(1.614,1.710,1.867,1.479)
y3=c(1.361,1.270,1.375,1.299)
y4=c(1.459,1.335)
Is there a function that can give me the length for each, like the made up
example below?
>function(length(y1:y2)
[1] 3 4 4 2
[[alternative HTML version deleted]]
2011 Sep 20
1
means across list of data frames
I have a list of data frames like the following:
set.seed(123)
a<- data.frame(x=runif(10), y = runif(10), sample = seq(1,10))
b<- data.frame(x=runif(10), y = runif(10), sample = seq(1,10))
L<- list(a,b)
All data frames in the list have the same dimensions. I need to calculate
the sample means for x and y. The real data are lists of several thousand
quite large dataframes, so I need
2012 Jan 12
1
parallel computation in plyr 1.7
Dear all,
I have a question regarding the possibility of parallel computation in plyr
version 1.7.
The help files of the following functions mention the argument '.parallel':
ddply, aaply, llply, daply, adply, dlply, alply, ldply, laply
However, the help files of the following functions do not mention this
argument: ?d_ply, ?aply, ?lply
Is it because parallel computation is not supported for these latter
functions? Or is it just because the documentation was not updated for
these functions after adding the parallel computation fe...
2013 Mar 22
1
Median across matrices
Hey all,
I have a list of matrices. I'd like to calculate the median across all those matrices for each element. What I'd like to end up with is a matrix containing the median of all [1,1] [1,2] etc. elements across all matrices.
Is there a concise way of doing that?
Thanks!
2011 Nov 10
2
Listing tables together from random samples from a generated population?
.
HI there,
I'd like to show demonstrate how the chi-squared distribution works, so I've come up with a sample data frame of two categorical variables
y<-data.frame(gender=sample(c('Male', 'Female'), size=100000, replace=TRUE, c(0.5, 0.5)), tea=sample(c('Yes', 'No'), size=100000, replace=TRUE, c(0.5, 0.5)))
And I'd like to create a list of 100
2011 Aug 04
3
functions on rows or columns of two (or more) arrays
I realize this should be simple, but even after reading over the several
help pages several times, I still cannot decide between the myriad "apply"
functions to address it. I simply want to apply a function to all the rows
(or columns) of the same index from two (or more) identically sized arrays
(or data frames).
For example:
> a=matrix(1:50,nrow=10)
>
2013 Jun 05
2
combining two different matrizes
Hello together,
this is ma first post, so please aplogize me if post this in the wrong
section.
I have problem concerning ma two matrizes.
After a regressione and so on, I got two matrizes
Matrixres contains the results of ma calculation.
Matrixr contains my detiene, which where Aldo used for the regression.
Please ser the following code:
#Datei einlesen
residual =
2012 Jan 18
4
R-Help
I am trying to create a frequency distribution and I am a bit confused.
Here are the commands I have entered:
> data <- read.csv(file="40609_sortedfinal.csv",head=TRUE,sep=",")
> NumberOfActionsByStatus = data$STATUS
> NumberOfActionsByUser = data$ETS_LOGIN
> NumberOfBidOffer = data$BID_OFFER
> NumberOfActionsByUser.freq = table(NumberOfActionsByUser)
>