search for: drat

Displaying 20 results from an estimated 133 matches for "drat".

Did you mean: draft
2013 Apr 17
2
remove higher order interaction terms
Dear all, Consider the model below: > x <- lm(mpg ~ cyl * disp * hp * drat, mtcars) > summary(x) Call: lm(formula = mpg ~ cyl * disp * hp * drat, data = mtcars) Residuals: Min 1Q Median 3Q Max -3.5725 -0.6603 0.0108 1.1017 2.6956 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.070e+03 3.856e+02 2....
2015 Mar 12
1
Best way to handle dependency on non-CRAN package / large data package?
Hi Dirk, I'm interested in pursing this but I haven't been able to figure how to to make it work. Here's what I have so far: install.packages("drat") library(drat) addRepo("arilamstein") I (obviously) have a copy of the choroplethrZip github repo locally. I typed: git checkout gh-pages git push I gather that this is what I needed to to do make the repo web-accessible. Although I found this step a bit confusing because it look...
2012 Nov 04
1
Apply same linear model to subset of dataframe
...lines of code (for example using a for loop, a function or plyr) to achieve the same output as below? data(mtcars) # Apply the same model to the dataset but choosing different combinations of dependent (DV) and independent (IV) variables in each case: lm.mpg= lm(mpg~cyl+disp+hp, data=mtcars) lm.drat = lm(drat~wt+qsec, data=mtcars) lm.gear = lm(gear~carb+hp, data=mtcars) # Plot residuals against fitted values for each model plot(lm.mpg$fitted,lm.mpg$residuals, main = "lm.mpg") plot(lm.drat$fitted,lm.drat$residuals, main = "lm.drat") plot(lm.gear$fitted,lm.gear$residuals, ma...
2015 Mar 12
2
Best way to handle dependency on non-CRAN package / large data package?
...anything else to consider. I have never had to manage package > dependencies > | outside of CRAN, and have always thought of CRAN as being a "closed > | ecosystem", where there were not any dependencies outside of CRAN. > | > | Can anyone provide guidance on this? > > drat can help with this problem. Have a look at > > http://dirk.eddelbuettel.com/code/drat.html > > as well as my blog and the GitHub repo of drat. > > In a nutshell, it creates repositories you can access via update.packages() > and install.packages() as if they were CRAN or B...
2016 Mar 02
2
install.packages() fails with drat repository on networkdrive
...h file or directory' the repositories set in .Rprofile are "http://lib.ugent.be/CRAN/" "file://servername/repository_path" There is a file PACKAGES.gz at //servername/repository_path/bin/windows/contrib/3.2/ but no file PACKAGES I'm not sure if this is 1) a bug in the drat package: not creating PACKAGES 2) a bug in read.dcf(): not looking if PACKAGES.gz is present 3) a bug in available.packages(). Debugging install.packages() indicates that the error occurs at the line below with type <- "win.binary", repos <- getOption("repos") and missing(...
2016 Mar 02
0
install.packages() fails with drat repository on networkdrive
...#39; | | the repositories set in .Rprofile are | "http://lib.ugent.be/CRAN/" "file://servername/repository_path" | | There is a file PACKAGES.gz at | //servername/repository_path/bin/windows/contrib/3.2/ but no file | PACKAGES | | I'm not sure if this is | 1) a bug in the drat package: not creating PACKAGES | 2) a bug in read.dcf(): not looking if PACKAGES.gz is present | 3) a bug in available.packages(). Debugging install.packages() | indicates that the error occurs at the line below with type <- | "win.binary", repos <- getOption("repos") and...
2011 Jun 21
5
omitting columns from a data frame
Dear R People: I have a data frame, xm1, which has 12 rows and 4 columns. If I put is xm1[,-4], I get all rows, and columns 1 - 3, which is as it should be. Now, is there a way to use the names of the columns to omit them, please? Thanks so much in advance! Sincerely, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown
2009 Apr 27
0
VIF's in R using BIGLM
...ariance inflation factors) from the regression output of BIGLM. Traditionally, this has been possible with the regular lm() function. Follows a quick illustration (the model below is pretty silly, only for illustration purposes). Example dataset: > mtcars mpg cyl disp hp drat wt qsec vs am gear carb Mazda RX4 21.0 6 160.0 110 3.90 2.620 16.46 0 1 4 4 Mazda RX4 Wag 21.0 6 160.0 110 3.90 2.875 17.02 0 1 4 4 Datsun 710 22.8 4 108.0 93 3.85 2.320 18.61 1 1 4 1 Hornet 4 Drive 21.4 6 258.0 110 3.08 3.215 19.44 1 0...
2015 Mar 12
2
Best way to handle dependency on non-CRAN package / large data package?
I have just written a package called choroplethrZip <https://github.com/arilamstein/choroplethrZip> which contains a shapefile and metadata on US Zip codes. It is currently hosted on github, has a tagged version number (v1.0.0) and passes R CMD check as verified by Travis. My plan is to use this in the next version of my package choroplethr <https://github.com/arilamstein/choroplethr>.
2015 Mar 12
0
Best way to handle dependency on non-CRAN package / large data package?
...eau updates their shapefiles, and I subsequently decide to update | the package? Or if I discover an error in the package and decide to update it? | The choroplethr package could have a dependency, and it's not clear how to make | that dependency explicit to the user.? 100% agree. In writing drat, and talking to R users about it, I surprisingly often find many (advanced) R users who seem to not use update.packages() at all. R itself has your problem solved by providing repositries. And drat makes creating and filling repositories (the author side) vey easy -- and that we also aid the user...
2010 Nov 30
3
pca analysis: extract rotated scores?
Dear all I'm unable to find an example of extracting the rotated scores of a principal components analysis. I can do this easily for the un-rotated version. data(mtcars) .PC <- princomp(~am+carb+cyl+disp+drat+gear+hp+mpg, cor=TRUE, data=mtcars) unclass(loadings(.PC)) # component loadings summary(.PC) # proportions of variance mtcars$PC1 <- .PC$scores[,1] # extract un-rotated scores of 1st principal component mtcars$PC2 <- .PC$scores[,2] # extract un-rotated scores of 2nd principal component head(...
2016 Apr 14
4
Bug in by() function which works for some FUN argument and does not work for others
...Qu.:6.000 1st Qu.:196.3 1st Qu.:116.5 Median :17.30 Median :8.000 Median :275.8 Median :175.0 Mean :17.15 Mean :6.947 Mean :290.4 Mean :160.3 3rd Qu.:19.20 3rd Qu.:8.000 3rd Qu.:360.0 3rd Qu.:192.5 Max. :24.40 Max. :8.000 Max. :472.0 Max. :245.0 drat wt qsec vs am Min. :2.760 Min. :2.465 Min. :15.41 Min. :0.0000 Min. :0 1st Qu.:3.070 1st Qu.:3.438 1st Qu.:17.18 1st Qu.:0.0000 1st Qu.:0 Median :3.150 Median :3.520 Median :17.82 Median :0.0000 Median :0 Me...
2016 Apr 14
0
Bug in by() function which works for some FUN argument and does not work for others
I think you are not using the best function for what your intentions are. Try: > by(data=mtcars, INDICES=list(as.factor(mtcars$am)), FUN=colMeans) : 0 mpg cyl disp hp drat wt qsec vs 17.1473684 6.9473684 290.3789474 160.2631579 3.2863158 3.7688947 18.1831579 0.3684211 am gear carb 0.0000000 3.2105263 2.7368421 --------------------------------------------------------------------------- : 1 mpg...
2017 Jun 08
3
Creating a private CRAN with webpages
Hello, I am trying to setup a private CRAN for work (behind a firewall). The best options available include miniCRAN <https://github.com/RevolutionAnalytics/miniCRAN>, drat <https://github.com/eddelbuettel/drat> and packrat <https://rstudio.github.io/packrat/>. One problem is these packages do not automatically generate the web pages that are on the CRAN. Examples: https://cran.r-project.org/web/packages/index.html https://cran.r-project.org/web/packages/...
2016 Apr 15
4
Bug in by() function which works for some FUN argument and does not work for others
...:06 AM, Adrian Du?a <dusa.adrian at unibuc.ro> wrote: > I think you are not using the best function for what your intentions are. > Try: > > > by(data=mtcars, INDICES=list(as.factor(mtcars$am)), FUN=colMeans) > : 0 > mpg cyl disp hp drat wt > qsec vs > 17.1473684 6.9473684 290.3789474 160.2631579 3.2863158 3.7688947 > 18.1831579 0.3684211 > am gear carb > 0.0000000 3.2105263 2.7368421 > > --------------------------------------------------------------...
2015 Mar 12
0
Best way to handle dependency on non-CRAN package / large data package?
...way to do this, or if there is | anything else to consider. I have never had to manage package dependencies | outside of CRAN, and have always thought of CRAN as being a "closed | ecosystem", where there were not any dependencies outside of CRAN. | | Can anyone provide guidance on this? drat can help with this problem. Have a look at http://dirk.eddelbuettel.com/code/drat.html as well as my blog and the GitHub repo of drat. In a nutshell, it creates repositories you can access via update.packages() and install.packages() as if they were CRAN or BioC. It also uses GitHub to au...
2020 Oct 18
1
Resultado de la consola como un tibble
...long[ , list(p_value = shapiro.test(value)$p.value, v_stat = shapiro.test(value)$statistic) , by = .(variable)] variable p_value v_stat 1: mpg 1.228814e-01 0.9475647 2: cyl 6.058338e-06 0.7533100 3: disp 2.080657e-02 0.9200127 4: hp 4.880824e-02 0.9334193 5: drat 1.100608e-01 0.9458839 6: wt 9.265499e-02 0.9432577 7: qsec 5.935176e-01 0.9732509 8: vs 9.737376e-08 0.6322635 9: am 7.836354e-08 0.6250744 10: gear 1.306844e-05 0.7727856 11: carb 4.382405e-04 0.8510972 Saludos, Carlos Ortega www.qualityexcellence.es El dom.,...
2007 Jun 05
3
read table
Hi, I'm a novice of R. I want to read the following table into R: names mpg cyl disp hp drat Mazda RX4 21.0 6 160.0 110 3.90 Mazda RX4 Wag 21.0 6 160.0 110 3.90 The command I used is: > test <- read.table(file.choose(),header=T) The result is: Error in read.table(file.choose(), header = T) : more columns than column names Can anybody tells...
2013 Feb 20
0
Bayesian mixing model
...9383 14.68013 RoadRunoff 9.177297 1.9034304 0.4618634 22.22206", header=TRUE) ...and geochemistry for 1 target sediment called Dat: Dat<-read.table(text=" CaO MgO Na2O Al2O3 Targethf 15.741 1.346 0.368 19.872", header=TRUE) I have absolute stdev on the sources called adssdRat: abssdRat<-read.table(text=" CaO MgO Na2O Al2O3 Topsoils 1.8552515 0.1135672 0.06212094 1.491125 ChannelBanks 9.8400162 0.1401057 0.08599080 2.708710 FieldDrains 2.3896499 0.1961217 0.02545431 4.300644 RoadRunoff 0.7780579 0.1749869 0.02848264 1.1167...
2020 Oct 18
2
Resultado de la consola como un tibble
Buen día estimados Estoy tratando de hacer un tibble con los resultados de un apply que se muestran en la consola que me da R, no estoy seguro si eso se pueda hacer, pero me gustaría organizar los resultados de esa manera. mi código es: data("mtcars") Mtcars_matriz <- as.matrix(mtcars) apply(Mtcars_matriz, MARGIN =2, FUN = shapiro.test) DF2 <- tibble(Variable = NA, W = NA, Pvalue =