apply
which list element is being processed when using snowfall::sfLapply?
Assume we have a list (mylist) that is use as input object for a lapply function. Is there a way to know which element in mylist is being evaluated? The method should work on lapply and snowfall::sfAp[详细]
2023-01-24 14:03 分类:问答Why does sapply return a matrix that I need to transpose, and then the transposed matrix will not attach to a dataframe?
I would appreciate insight into why this happens and how I might do this more eloquently. When I use sapply, I would like it to return a 3x2 matrix, but it returns a 2x3 matrix. Why is this? And why[详细]
2023-01-24 02:28 分类:问答How does javascript eval handle 'this'
I ran tests in Firefox 3.6.11, if that matters, an开发者_如何学Pythond eval misbehaves in the context of call and apply. It somehow jumps over the current \'this\' object. Why?[详细]
2023-01-21 08:35 分类:问答How to use apply, cat and print, without getting NULL
I am trying to use cat() as functions inside apply(). I can almost make R do what I want, but I\'m getting some very confusing (to me) NULLS at the end of the return. Here is a silly example, to highl[详细]
2023-01-20 01:07 分类:问答Can I use apply() with constructor to pass arbitrary number of parameters
I\'ve got a function wich can accept a varible number of parameter with a rest operator. I want create an object passing the argument collected with the rest operator directly to a constructor withou[详细]
2023-01-18 19:46 分类:问答Run time - using apply functions
I have two apply functions excecuting the average and standard deviation across the first two dimensions on a large three dimentional array (437216,8,3). It takes 16 minutes to complete on Rx32. It\'s[详细]
2023-01-15 09:41 分类:问答How to transform a dataframe of characters to the respective dates?
I noticed already a couple of times that working with dates doesn\'t allow for using the usual tricks in R. Say I have a dataframe Data with Dates (see below), and I want to convert the complete dataf[详细]
2023-01-14 07:21 分类:问答Apply over two data frames
I\'m using R, and I have two data.frames, A and B. They both have 6 rows, but A has 25000 columns (genes), and B has 30 columns. I\'d like to apply a function with two arguments f(x,y) where x is ever[详细]
2023-01-13 01:58 分类:问答Grouping functions (tapply, by, aggregate) and the *apply family
Whenever I want to do something \"map\"py in R, I usually try to use a function in the apply family.[详细]
2023-01-12 12:28 分类:问答Algorithm to determine proper divisors
I am interested in finding the numbers that exhibit the property of having the sum of their proper divisors equal to the number. The first example is 6, where the proper divisors are 1 + 2 + 3 = 6.[详细]
2023-01-05 12:55 分类:问答