
Recent Posts
Recent Comments
ljbldwj@gmail.com on Complexvalued linear models Johne73 on Matlabstyle multiple assignme… Superman on Keyboard… ktoki on R SQLish aggregation Not Quite Functional… on Rearranging definitions in R Archives
Categories
Meta
Category Archives: R
“Inside” Functors — Multiple Arguments
Again for HTML reasons this has been taken to http://strugglingthroughproblems.blogspot.com/2011/04/insidefunctorsmultiplearguments.html
Posted in R
Leave a comment
“Inside” Functors
So, WordPress doesn’t like RweaveHTML, so this is posted at http://strugglingthroughproblems.blogspot.com/2011/04/insidefunctors.html
Posted in R
Leave a comment
Complexvalued linear models
Someone has probably already written code to do this. But I couldn’t find it in CRAN, so here goes. Oh no lm() won’t take complex numbers! (or rather, it’ll take them, but it’ll discard the imaginary part.) Easy enough fix. … Continue reading
Posted in R
2 Comments
R SQLish aggregation
I came to R from SQL. I’ve heard that packages such as reshape and plyr are quite beautiful, but to me they are somewhat nonintuitive. I’m always looking for SELECT mean(sodium) as mean, variance(sodium) as var FROM texas GROUP BY … Continue reading
Posted in R
5 Comments
Subset views in R
I don’t know how to do this in R. So let me just say why I can’t. I wanted something akin to Boost‘s submatrix views, where you can have indexes map back to the original matrix, so you don’t create … Continue reading
Posted in R
4 Comments
Matlabstyle multiple assignment in R
R again! You know how in Matlab you can do? S, I = sort(M) I like that. R generic functions makes this possible. First, let’s genericize assignment. I feel like regular “=” and “<” oughta stay nongeneric, so let’s make … Continue reading
Posted in R
3 Comments
Packing everything into a data.frame
OK, I know I talk about R too much, but I like R, so I’m going to talk about it some more. Common situation: repeat a procedure many times; each time generates some large wadge of awfulstructured data, and in … Continue reading
Posted in R
Leave a comment