Re: [R] Dataverse (reading files with .tab and .7z suffixes)

2018-05-13 Thread Jorge Cimentada
Our just use the dataverse package already in CRAN: https://cran.r-project.org/web/packages/dataverse/index.html --- Jorge Cimentada *https://cimentadaj.github.io/ <https://cimentadaj.github.io/>* On Sun, May 13, 2018 at 2:04 PM, Thomas

Re: [R] [R-pkgs] Release of ess 0.0.1

2017-11-10 Thread Jorge Cimentada
. It is unrelated to the 'ess' package, designed to download data from the European Social Survey available at http://www.europeansocialsurvey.org Thanks for raising these thoughts. --- Jorge Cimentada *https://cimentadaj.github.io/ <https://cimentadaj.github

Re: [R] [R-pkgs] Release of ess 0.0.1

2017-11-10 Thread Jorge Cimentada
Thanks to all. Will consider this change in future releases. --- Jorge Cimentada *https://cimentadaj.github.io/ <https://cimentadaj.github.io/>* On Fri, Nov 10, 2017 at 12:41 PM, Rainer Krug <rainer_k...@icloud.com> wrote: > > > On 9 No

[R] [R-pkgs] Release of ess 0.0.1

2017-11-09 Thread Jorge Cimentada
of room for improvement. Thanks! ------- Jorge Cimentada *https://cimentadaj.github.io/ <https://cimentadaj.github.io/>* [[alternative HTML version deleted]] ___ R-packages mailing list r-packa...@r-pr

[R] Crash when installing heavy packages in remote server with R and Rstudio server

2017-08-06 Thread Jorge Cimentada
ver in itself because I get the exact same error with: R CMD INSTALL PISA2000lite_1.0.tar.gz Any idea why this might be occurring? --- Jorge Cimentada *https://cimentadaj.github.io/ <https://cimentadaj.github.io/&

Re: [R] Zenga - inequality index - Do you know any package to compute it?

2016-11-14 Thread Jorge Cimentada
A simple google search directs me to the 'convey' package in CRAN which has a function called svyzenga. Here for more details. Maybe that's what you want. [[alternative HTML version deleted]]

Re: [R] multiple uses ifelse function

2016-10-11 Thread Jorge Cimentada
Hi Letter, This should do it: testchange <- ifelse(testseq <= 4,'x', ifelse(testseq >= 5, 'y', testseq)) Read it as: if testseq <=4, print x, ifelse test seq >=5, print y, any other case, print testseq. [[alternative HTML version deleted]] __

Re: [R] Error creating named character vectors from column names in data frame.

2016-10-07 Thread Jorge Cimentada
Hi Bert, Yes, I'm aware of the difference between a and "a" but in terms of object classes I don't see the difference between "a" and names(mtcars)[1]. They're both strings. However, for creating a named character vector, this works: c("a" = "b) But this doesn't c(names(mtcars)[1] = "b") For

Re: [R] Error creating named character vectors from column names in data frame.

2016-10-07 Thread Jorge Cimentada
I'm sorry, there was a typo. The result is still the same: c("a" = "b") # named character vector class("a") # character class("b") # character c(names(mtcars)[1] = names(mtcars)[2]) # error class(names(mtcars)[1]) # character class(names(mtcars)[

[R] Error creating named character vectors from column names in data frame.

2016-10-07 Thread Jorge Cimentada
Hi everyone, I was hoping someone would explain why this doesn't work. c("a" = "b") # named character vector class("a") # character class("b") # character c(names(mtcars)[1] = names(mtcars[2]) # error class(names(mtcars)[1]) # character class(names

Re: [R] Using lm's subset parameter results in Error in xj[i] : invalid subscript type 'list'

2016-09-20 Thread Jorge Cimentada
(firstkids) Something along this line: lm(kid_score ~ mom_age , data = firstkids) *Jorge Cimentada* *Ph.D. Candidate* Dpt. Ciències Polítiques i Socials Ramon Trias Fargas, 25-27 | 08005 Barcelona Office 24.331 [Tel.] 697 382 009 jorge.ciment...@upf.edu http://www.upf.edu/dcpis/ On Tue, Sep 20

Re: [R] Matching/checking for occurence when values are double?

2016-09-09 Thread Jorge Cimentada
Matching 100 to 100.0 or 100.00 or whatever N number of decimales will always return a TRUE. The expression your using is correct. A more complete expression would be kidmomiq[100 == kidmomiq$mom_iq, ]. On Fri, Sep 9, 2016 at 2:01 PM, Matti Viljamaa wrote: I need to pick

Re: [R] Loop over rda list files and using the attach function

2016-08-30 Thread Jorge Cimentada
d the solution through: https://www.r-bloggers.com/a-better-way-of-saving-and-loading-objects-in-r/ *Jorge Cimentada* *Ph.D. Candidate* Dpt. Ciències Polítiques i Socials Ramon Trias Fargas, 25-27 | 08005 Barcelona Office 24.331 [Tel.] 697 382 009 jorge.ciment...@upf.edu http://www.upf.edu/dcpis

[R] Improving function that estimates regressions for all variables specified

2016-08-26 Thread Jorge Cimentada
ion(p) x <- as.formula(paste(c(dv, covariates[p]), collapse=" + "))) results <- lapply(lfo, function(o) lm(o, data=data)) return(results) } models("mpg",c("cyl","scale(disp)"), mtcars) models2(mpg ~ cyl + scale(disp), mtcars) See the differ

[R] Error in model.frame.default… variable lengths differ (Without NA's)

2015-12-02 Thread Jorge Cimentada
Hello everyone, I'm running an ordinal logistic and I keep getting this error: Error in model.frame.default(formula = eduattain ~ dadedu, data = workdataset, : variable lengths differ (found for '(weights)') I looked at several similar questions on the internet and ended up deleting all the