scussion around this at
https://github.com/DeclareDesign/DesignLibrary/issues/50 and linked issues
from
the last time I encountered this weird corner of R.
If anyone finds a better solution (or for the related problem of preserving
whitespace),
I would be interested as well.
Very respectfully,
Nea
I'd recommend you upgrade to R version 3.5.2, the version you have is quite
out of date.
On Wed, Jan 23, 2019 at 9:42 AM AbouEl-Makarim Aboueissa <
abouelmakarim1...@gmail.com> wrote:
> here is the messages I got when I install the "car" package:
>
> > install.packages("car")
> Installing package
I'm going to n-th Duncan's recommendations to try to keep your functions
small and try not to mess with environments.
... So I'm ashamed that I wrote the following - I apologize in advance.
But as an intellectual exercise, we can cannibalize the code for `dynGet`
and create a `dynSet` function wh
Noah,
If N is # of rows, k is # of unique IDs
Using which() is O(N), using which() in a loop is going to be O(Nk);
sorting the entire data is O(N ln N) and then you can process it in
contiguous blocks, no which required.
-Neal
On Thu, Nov 21, 2013 at 8:48 AM, William Dunlap wrote:
> print(1:100) [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
> 16 17 18 19 20 21 22 23 24 25 26
[27] 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
43 44 45 46 47 48 49 50 51 52
[53] 53 54 55 56 57 58 59 60 61 62 63 64 65 66
For your problem, you might want to use saveRDS and readRDS instead of
save and load. I would also use dir to get a list of files rather
than paste.
Then your solution might look like:
run <- function(filename) {
df <- readRDS(filename);
coef( lm(df[,1] ~ df[,2]) )
}
results <- lapply
0.95
> > system.time(replicate(1000, f3(cg, hs, es)))
>user system elapsed
>0.190.020.20
> > system.time(replicate(1000, f4(cg, hs, es)))
>user system elapsed
>0.950.03 0.98
>
>
> R version 3.0.0 (2013-04-03)
> Platform: x8
I would do this to get the highest non-missing level:
x <- pmax(3*cg, 2*hs, es, 0, na.rm=TRUE)
rock chalk...
-nfultz
On Fri, Jun 07, 2013 at 06:24:50PM -0700, Joshua Wiley wrote:
> Hi Paul,
>
> Unless you have truly offended the data generating oracle*, the
> pattern: NA, 1, NA, should be a da
do.call("c", x)
maybe?
On Tue, Jun 26, 2012 at 02:25:40PM -0700, Jeroen Ooms wrote:
> I am looking for a function to flatten a list to a list of only 1
> level deep. Very similar to unlist, however I don't want to turn it
> into a vector because then everything will be casted to character
> vect
can be done in one line, but it is annoying and ugly, so you probably
shouldn't be doing it that way:
>sleep[sleep$group == 1,] <-sleep[sleep$group == 1,][order(sleep[sleep$group ==
>1,1]),]
>sleep
extra group ID
1 -1.6 1 2
2 -1.2 1 4
3 -0.2 1 3
4 -0.1 1 5
50.0
I had a similar survey, and ended up stuffing everything into one field
using the bitops library.
On Thu, Jul 7, 2011 at 4:18 AM, jeroen00ms wrote:
> I am working on a system to visualize survey responses. Survey responses
> typically include factors, numeric, timestamps, textfields and therefore
11 matches
Mail list logo