[R] How to clean up missing values in a list of lists

2015-02-10 Thread Aron Lindberg
ists$content[which(nchar(pull_lists$content)==NULL)]<-NA } clean_lists <- lapply(pull_lists, clean_files) But that simply replaces *every* value with NA (similarly if I change ==NULL to <1, or <2). How can I make this code work? Best, Aron --  Aron Lindberg Doctoral Candid

Re: [R] How to clean up missing values in a list of lists

2015-02-10 Thread Aron Lindberg
Thanks Dennis! In the end try worked: get_files <- function(pull_lists){   try(sapply(pull_lists$content, "[[", "filename" )) } Best, Aron --  Aron Lindberg Doctoral Candidate, Information Systems Weatherhead School of Management  Case Wes

[R] How do I know which package is loaded?

2015-02-18 Thread Aron Lindberg
--  Aron Lindberg Doctoral Candidate, Information Systems Weatherhead School of Management  Case Western Reserve University aronlindberg.github.io [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and

Re: [R] How do I know which package is loaded?

2015-02-18 Thread Aron Lindberg
Thanks! That’s perfect. Key is to load the local github repo into an Rstudio project first. --  Aron Lindberg Doctoral Candidate, Information Systems Weatherhead School of Management  Case Western Reserve University aronlindberg.github.io On Wed, Feb 18, 2015 at 11:39 AM, Thierry

[R] Subsetting a list of lists using lapply

2015-02-19 Thread Aron Lindberg
nds "manually" it returns NULL for every list, and when I run the whole apply function it says:  Error in FUN(X[[1L]], ...) : subscript out of bounds I've tried reading the sections on lists and subsetting in Hadley's Advanced R, but I still cannot figure it out.

Re: [R] Subsetting a list of lists using lapply

2015-02-20 Thread Aron Lindberg
sometimes input[[i]]$content simply returns list(). Chuck’s solution however bypasses this and works on the full dataset (which was 8mb, which is why I didn’t upload it as a gist). Best, Aron --  Aron Lindberg Doctoral Candidate, Information Systems Weatherhead School of

[R] "Design patterns" for data munging?

2015-02-20 Thread Aron Lindberg
r? Best, Aron --  Aron Lindberg Doctoral Candidate, Information Systems Weatherhead School of Management  Case Western Reserve University aronlindberg.github.io [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUB

Re: [R] Subsetting a list of lists using lapply

2015-02-20 Thread Aron Lindberg
/aronlindberg/92700c04c88ff112e4f7/raw/0f3cd8468f4dc82267be3cec72d53a7a04f5c449/dput.R --  Aron Lindberg Doctoral Candidate, Information Systems Weatherhead School of Management  Case Western Reserve University aronlindberg.github.io On Fri, Feb 20, 2015 at 8:25 AM, Aron Lindberg wrote

[R] Rate limiting question on SO

2015-03-23 Thread Aron Lindberg
does rate limiting? I have posted it as a question on SO, with a +50 bounty on it, but need some more comprehensive answers: http://stackoverflow.com/questions/28770297/manual-api-rate-limiting Does anyone have experience in this area and could offer some advice? Best, Aron --  Aron