[R] lme4 - Mixed Model question

2020-07-13 Thread Axel Urbiz
variable. Say I have 3 covariates {x1, x2, x3} and 2 groups {g1, g2}. I want to specify a model for g1 that only depends on x1 and x2, and a model for g2 that only depends on x2 and x3. Is this possible with lme4? Thanks, Axel. __ R-help@r-project.org

Re: [R] "effects" package with "lme4"

2020-05-15 Thread Axel Urbiz
Subject. Sorry if my interpretation is incorrect. Best, Axel. > On May 15, 2020, at 5:51 PM, Fox, John wrote: > > Dear Axel, > > There only one fixed effect in the model, ns(Days, 3), so I don't know what > you expected. > > Best, > John > --

[R] "effects" package with "lme4"

2020-05-15 Thread Axel Urbiz
+ (ns(Days, 3) | Subject), sleepstudy) coef(fm1) plot(allEffects(fm1)) ### End example Thanks, Axel. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] Loop inside dplyr::mutate

2020-05-09 Thread Axel Urbiz
6)*(1-P_7)*(1-P_8)*(1-P_9), PC_10 = 1-(1-P_1)*(1-P_2)*(1-P_3)*(1-P_4)*(1-P_5)*(1-P_6)*(1-P_7)*(1-P_8)*(1-P_9)*(1-P_10) ) Thanks, Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBS

[R] mgcv::bam with monotonic constraints

2019-01-13 Thread Axel Urbiz
gards, Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and pr

[R] Spatial Clustering with spdep::skater

2018-07-07 Thread Axel Urbiz
criteria to use? Thanks Axel. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self

Re: [R] Add wrapper to Shiny in R package

2017-09-21 Thread Axel Urbiz
t, output) { get("xs", envir = my.env) output$hist <- renderPlot( hist(xs, breaks = input$n, col = "skyblue", border = "white") ) } ) myApp(rnorm(100)) Axel. On Thu, Sep 21, 2017 at 11:13 AM, Thierry Onkelinx wrote: > Dear Axel, >

[R] Add wrapper to Shiny in R package

2017-09-21 Thread Axel Urbiz
a file named app.R with the following content:* shinyApp( ui = fluidPage( sidebarLayout( sidebarPanel(sliderInput("n", "Bins", 5, 100, 20)), mainPanel(plotOutput("hist")) ) ), server = function(input, output) { output$hist <- renderPlot

[R] Shiny App inside R Package

2017-09-17 Thread Axel Urbiz
col = "skyblue", border = "white") ) } ) } myApp(rnorm(100)) Regards, Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.eth

[R] quote()/eval() question

2017-09-08 Thread Axel Urbiz
ument of type 'language' Thank you, Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www

Re: [R] Can this be done in ggplot?

2017-04-15 Thread Axel Urbiz
lt;- factor(df$nv, levels = df$nv) ggplot(df, aes(x = nv , y = v, fill = f)) + geom_bar(position="dodge", stat = "identity") El 14/04/17 a las 10:08, Axel Urbiz escribi�: Hi, I need to bars to display in order based on the values of "v" within each group "g&

Re: [R] Can this be done in ggplot?

2017-04-15 Thread Axel Urbiz
e(g, desc(v)) > df$nv <- with(df, factor(paste(g,f))) > df$nv <- factor(df$nv, levels = df$nv) > > ggplot(df, aes(x = nv , y = v, fill = f)) + > geom_bar(position="dodge", stat = "identity") > > > El 14/04/17 a las 10:08, Axel Urbiz escribi�:

[R] Can this be done in ggplot?

2017-04-14 Thread Axel Urbiz
n certain groups df$v <- runif(nrow(df)) ggplot(df, aes(x = g, y = v, fill = f)) + geom_bar(position="dodge", stat = "identity") Thanks, Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing li

[R] Combining grid::grid.raster plots

2017-04-10 Thread Axel Urbiz
9,nr=3,byr=T)) for (i in 1:9) { image <- random_image() grid.raster(image) } Any guidance would be highly appreciated. Best, Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, s

[R] Deploying R on the cloud - Help Please

2017-03-31 Thread Axel Urbiz
terms of best practices / companies that support deploying R models on the cloud. Thank you for your help. Regards, Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https

[R] Extending sparklyr

2016-10-09 Thread Axel Urbiz
g with my code. Any hints would be much appreciated. Best, Axel. - library(sparklyr) library(dplyr) sc <- spark_connect(master = "local") x <- copy_to(sc, iris) x <- x %>% select(Petal_Width, Petal_Length) # set params k <- 3 iter.max <- 100 features <- dplyr:

[R] Defining contrasts within function

2016-05-23 Thread Axel Urbiz
<- function(n, contrasts) { contr.treatment(n, contrasts = FALSE) } f <- gl(2, 8, labels = c("Control", "Treat")) contrasts(f) contr(f) Thanks, Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mail

[R] TensorFlow in R

2016-04-01 Thread Axel Urbiz
Hi All, I didn't have much success through my Google search in finding any active R-related projects to create a wrapper around TensorFlow in R. Anyone know if this is on the go? Thanks, Axel. [[alternative HTML version deleted]] __ R-h

[R] Statistical analysis of olive dataset

2016-03-12 Thread Axel
p(olivenum,cor=T)) plot(princomp(olivenum,cor=T)$scores,rownames(olivenum)) abline(h=0,v=0) I determined that three components can explain a great part of variability but I don't know which are these components. How should I continue? Thank you for attention, Axel __

[R] Sorting in trees problem

2016-02-24 Thread Axel Urbiz
riables initially only. sort_fun <- function(x) { index <- order(x) x <- x[index] data.frame(x, index) # the index gives original position of the obs } s_df <- lapply(df, function(x) sort_fun(x)) sol2 <- s_df[[1]][s_df$x1$index %in% nodeObsInd, ] ### check same r

[R] model.matrix behaviour

2016-01-07 Thread Axel Urbiz
trt:x1 1 1 1 0 0 -0.6264538 2 1 -1 0 0 -0.1836433 3 1 0 -1 0 0.8356286 4 1 -1 0 0 -1.5952808 5 1 -1 0 0 -0.3295078 6 1 0 1 0 -0.8204684

Re: [R] Extract Standard Errors of Model Coefficients

2015-12-29 Thread Axel Urbiz
Thanks a lot John. Forgot I could arbitrarily change the class of objects, which against all critics, can be very helpful at times. Best, Axel. > On Dec 29, 2015, at 9:35 AM, Fox, John wrote: > > Dear Axel, > > If you look at the content of the list returned by glm.fit,

[R] Extract Standard Errors of Model Coefficients

2015-12-29 Thread Axel Urbiz
lt;- glm.fit(x = x, y = y1) seCoef <- sqrt(diag(vcov(M1))) seCoef (Intercept) x 0.09698729 0.10772703 Thank you, Axel. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-he

[R] Returning a factor from vapply

2015-11-25 Thread Axel Urbiz
frame(vapply(df, mycuts, character(nrow(df) identical(levels(df_out$x1), levels(cut(df$x1, breaks = unique(quantile(df$x1, seq(0, 1, 1/4), na.rm = TRUE)), include.lowest = TRUE))) Thanks for any poin

[R] rank/sort problem

2015-11-21 Thread Axel Urbiz
s for any help. Best Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-g

Re: [R] Help with dplyr

2015-11-05 Thread Axel Urbiz
.. Go >>> Live... >>>> DCN:Basics: ##.#. ##.#. Live >>> Go... >>>> Live: OO#.. Dead: OO#.. >>> Playing >>>> Research Engineer (Solar/BatteriesO.O#. #.O#. with >>>> /Software/Embedded Controllers) .OO#. .OO#. &

[R] Help with dplyr

2015-11-05 Thread Axel Urbiz
/nBins))) bin <- data.frame(pred = pred, bin = cut(pred, breaks = Breaks, include.lowest = TRUE)) bin } res_dplyr <- df %>% group_by(models) %>% do(create_bins(.$pred, 10)) Warning message: In rbind_all(out[[1]]) : Unequal factor levels: coercing to character Thank you, A

Re: [R] User-defined functions in dplyr

2015-11-02 Thread Axel Urbiz
Nice example of the issue Bill. Thank you. Is this a known issue? Plans to be fixed? Thanks again, Axel. > On Nov 2, 2015, at 8:58 PM, William Dunlap wrote: > > dplyr::mutate does not collapse factor variables well. They seem to get > their levels from the levels > compute

Re: [R] User-defined functions in dplyr

2015-11-02 Thread Axel Urbiz
rame(res_dplyr)) [1] FALSE #levels(res_dplyr$bin) == levels(res_plyr$bin) Thanks, Axel. > On Oct 30, 2015, at 12:19 PM, William Dunlap wrote: > > dplyr::mutate is probably what you want instead of dplyr::summarize: > > create_bins3 <- function (xpred, nBins) > { >

[R] dplyr instead of plyr: Help

2015-11-02 Thread Axel Urbiz
<- dplyr::summarize(dplyr::group_by(dft, bin), sumY = sum(y)) dft } res_dplyr <- dplyr::mutate(dplyr::group_by(df, models), fooFun2(pred, y)) head(res_dplyr) Thanks Axel. [[alternative HTML version deleted]] __ R-help@r-proj

[R] dplyr instead of plyr: Help

2015-11-02 Thread Axel Urbiz
p_by(dft, bin), sumY = sum(y)) dft} res_dplyr <- dplyr::mutate(dplyr::group_by(df, models), fooFun2(pred, y))Error: incompatible size (2), expecting 50 (the group size) or 1 head(res_dplyr) Thank you. Axel. [[alternative HTML version deleted]]

Re: [R] User-defined functions in dplyr

2015-10-30 Thread Axel Urbiz
(Solar/BatteriesO.O#. #.O#. with > /Software/Embedded Controllers) .OO#. .OO#. rocks...1k > --- > Sent from my phone. Please excuse my brevity. > > On October 29, 2015 4:55:

[R] User-defined functions in dplyr

2015-10-29 Thread Axel Urbiz
t;- dplyr::summarize(by_group, create_bins, nBins) Error: not a vector Any help would be much appreciated. Best, Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.e

[R] User-defined functions in dplyr

2015-10-29 Thread Axel Urbiz
ks, include.lowest = TRUE)) dfB} nBins = 10res_plyr <- plyr::ddply(df, plyr::.(models), create_bins, nBins)head(res_plyr) ### Using dplyr (fails) by_group <- dplyr::group_by(df, models)res_dplyr <- dplyr::summarize(by_group, create_bins, nBins)Error: not a vector Any help would

[R] Variable names conflict

2015-10-15 Thread Axel Urbiz
t;- df[, 1, drop = FALSE] dfOut <- data.frame(df, x) dfOut } Thanks! Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] H2O Package - Error Messages

2015-08-08 Thread Axel Urbiz
ch issue iris.dl3 <- h2o.deeplearning(x = 1:4, y = 5, hidden=list(c(5,5), c(10,10)), training_frame = iris.hex) Error in which(params[[i$name]] == Inf | params[[i$name]] == -Inf) : (list) object cannot be coerced to type 'double' Any pointers would b

Re: [R] Error in local package install

2015-06-16 Thread Axel Urbiz
Thanks again Uwe. I haven't renamed the file, only in the text sent to R-help. Here's the error again I'm getting. Sorry, this s a bit frustrating... Thanks, Axel Error in read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) : ca

Re: [R] Error in local package install

2015-06-16 Thread Axel Urbiz
Thanks Uwe. Actually, the problem persists in R-3.2.1. If it helps, the .zip file is here: http://win-builder.r-project.org/yC8eUu09w3Ui/ Thank you, Axel. On Mon, Jun 15, 2015 at 5:41 PM, Uwe Ligges wrote: > > > On 15.06.2015 22:32, Axel Urbiz wrote: > >> Hello, >>

[R] Error in local package install

2015-06-15 Thread Axel Urbiz
r similar email threats with no success. Btw - I've install all the packages dependencies prior to the above. I'm on R 3.2.0. Any guidance would be much appreciated. Thank you. Axel. [[alternative HTML version deleted]] __ R-help

Re: [R] geom_errorbar() issue in ggplot2

2015-04-23 Thread Axel Urbiz
Thanks Thierry. So if a variable x = a, and the limits for x are [a, a+b], is that data point considered outside the limits? Thanks, Axel. On Thu, Apr 23, 2015 at 6:17 AM, Thierry Onkelinx wrote: > The limits are more narrow than the data. ggplot2 treats data outside the > limits as NA.

[R] geom_errorbar() issue in ggplot2

2015-04-23 Thread Axel Urbiz
cale_y_continuous(limits = c(0, 1), breaks = seq(0, 1, 0.1)) pp1 pp2 <- pp1 + geom_errorbar(data=df, aes(ymin=ll,ymax=ul), width=0.02) pp2 Warning message: In loop_apply(n, do.ply) : Removed 2 rows containing missing values (geom_path). > Thanks for any pointers. Best, Axel.

[R] Installing R on Linux Red Hat Server

2015-03-12 Thread Axel Urbiz
advance for any help. Best, Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org

[R] Error in help files connection

2015-01-29 Thread Axel Urbiz
quot;Error in gzfile(file, "rb") : cannot open the connection" I've search for this issue, but did not find anything that could help in my case. Any pointers would be much appreciated. Axel. [[alternative HTML version deleted]]

[R] Rubik cube-like plot in R

2014-10-25 Thread Axel Urbiz
Hi there, I need to create a Rubik cube plot in R, except that I don't need the face colours (all faces with the same colour is fine). I'd appreciate your guidance in terms of what graphic tool would be best for this purpose. Best, Axel. [[alternative HTML versi

[R] Question about searchTwitter{twitteR}

2014-09-07 Thread Axel Urbiz
same tweets? tweets <- searchTwitter('my text search', n = 1000, since = '2013-09-01', until = '2014-08-31') Thanks, Axel. [

Re: [R] Predictions from "coxph" or "cph" objects

2014-07-06 Thread Axel Urbiz
many thanks all for this discussion. It was very helpful. Best, Axel. On Sun, Jul 6, 2014 at 5:17 AM, Göran Broström wrote: > On 2014-07-06 10:48, Göran Broström wrote: > >> David and Axel, >> >> I have two comments to your discussion: >> >> (i) The ar

Re: [R] Predictions from "coxph" or "cph" objects

2014-07-05 Thread Axel Urbiz
s) ~ age + ph.ecog, lung) pred <- survfit(fit, newdata=lung) head(pred) Thanks again, Axel. On Sat, Jul 5, 2014 at 1:54 PM, David Winsemius wrote: > > On Jul 5, 2014, at 5:28 AM, Axel Urbiz wrote: > > Dear R users, >> >> My apologies for the simple question, as I&

[R] Predictions from "coxph" or "cph" objects

2014-07-05 Thread Axel Urbiz
ph.ecog, lung) fit2 <- cph(Surv(time, status) ~ age + ph.ecog, lung) head(predict(fit,type="lp")) head(predict(fit2,type="lp")) Thank you. Regards, Axel. [[alternative HTML version deleted]] __ R-help@r-project.org m

[R] knitr - Highlight code/output

2014-05-03 Thread Axel Urbiz
{Example 1} <>= set.seed(1) x <- matrix(rnorm(120), 12, 10) x @ \end{document} Thanks, Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] Sweave files into LaTex

2014-04-07 Thread Axel Urbiz
Thanks Michael. That worked perfect! Best Axel. On Sat, Apr 5, 2014 at 2:13 PM, Michael Friendly wrote: > If you use knitr, you can do, in master.Rnw > > <>= > @ > This is the equivalent of \input{} (but not \include{}) at the .Rnw level. > > At any rate, if you hav

[R] Sweave files into LaTex

2014-04-04 Thread Axel Urbiz
n the master.tex file add the following line: \include{Rcode.Rnw} But of course, that didn't work.Any help would be much appreciated. Best, Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.

Re: [R] Package dependencies in building R packages

2013-12-30 Thread Axel Urbiz
to my problem, but I'm to an expert: 1) Copy mvrnorm into my package, which I thought was not a good idea 2) Rename my tt() function to something else in my package, but this is painful as I have it all over the place in other functions. Any suggestions would be much appreciated. Best, Axel

[R] Package dependencies in building R packages

2013-12-30 Thread Axel Urbiz
e function miscFUN from {foo_depend} without having the user to have installed A, B, C? (as none of those packages are needed for my package to work properly). Also, is this a best practice? Thanks for any guidance. Best, Axel. [[alternative HTML versi

[R] Help with vapply() loop

2013-10-02 Thread Axel Urbiz
y variables res <- vapply(m.ind, function(i) AIC(glm(as.formula(paste('y ~', paste(var_names[i]))), data = df)), FUN.VALUE = 0); res [1] 267.2759 265.9167 265.4468 Thank you, Axel.

[R] Permutation Test on Interactions {coin}

2013-09-23 Thread Axel Urbiz
covariate x. set.seed(1) library("coin") data("rotarod", package = "coin") x <- rnorm(24) rotarod <- cbind(rotarod, x) pvalue(independence_test(time ~ group * x, data = rotarod)) Your advice would be much appreciated

[R] glmnet on Autopilot

2013-07-17 Thread Axel Urbiz
Dear List, I'm running simulations using the glmnet package. I need to use an 'automated' method for model selection at each iteration of the simulation. The cv.glmnet function in the same package is handy for that purpose. However, in my simulation I have p >> N, and in some cases the selected mo

[R] Constrained Optimization in R (alabama)

2013-02-10 Thread Axel Urbiz
] <- x[1] + x[3] -1 h[2] <- x[2] + x[4] -1 h[3] <- x[1] * x[3] h[4] <- x[2] * x[4] h } res <- constrOptim.nl(par = c(1, 1, 1, 1), fn = ff, heq = heq) res$convergence #why NULL? matrix(round(res$par, 2), 2, 2) #why constraints are not satisfied? Axel.

[R] Optimization Problem in R

2013-02-09 Thread Axel Urbiz
d)) } constrOptim(theta = c(0, 0, 0, 0), f = ff, ui=rbind(c(1, 1), c(1, 1)), ci=c(1, 1)) Best, Axel. [[alternative HTML version deleted]] __

[R] Problem with ggmap

2012-12-07 Thread Axel Urbiz
, lwd, srt, adj, bg, fg, min, max Thanks, Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-gui

[R] Credit Scoring in R - Weight of Evidence

2012-10-20 Thread Axel Urbiz
Dear List, I couldn't find any package that performs the "weight of evidence" of predictors (a transformation usually performed in credit scoring applications). Is there any that you know? Thanks, Axel. [[alternative HTML

Re: [R] Complex sort problem

2012-05-18 Thread Axel Urbiz
matrix[,1] (avoiding sorting again) b.dframe[, var1][match(sort_matrix[, var1], b.ind)] #this does not work, and if it did would be slow Thanks again, Axel. On Fri, May 18, 2012 at 9:50 AM, David Winsemius wrote: > > On May 18, 2012, at 6:37 AM, Axel Urbiz wrote: > > Would I be able

Re: [R] Complex sort problem

2012-05-18 Thread Axel Urbiz
respect to potentially any variable. Thanks again, Axel. On Thu, May 17, 2012 at 1:43 PM, Petr Savicky wrote: > On Thu, May 17, 2012 at 06:45:52AM -0400, Axel Urbiz wrote: > > Dear List, > > > > Is there a way I can sort a sample based on a sort index constructed from > &

[R] Complex sort problem

2012-05-17 Thread Axel Urbiz
x) x.sorted <- x[x.order] sample.ind <- sample(1:length(x), 5, replace = TRUE) #sample 1/2 size with replacement x.sample <- x[sample.ind] x.sample.sorted <- #??? (without sorting again) Thanks for any help on this. Regards, Axel. [[alte

[R] Last element of a vector by group

2012-05-15 Thread Axel Urbiz
any help Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, mini

[R] Issue with message()

2012-04-22 Thread Axel Urbiz
es so far...") This works perfectly on the Mac. However, on Win 7 the message is not printed while the function is executing, but all when it finished running. Any hint what might be the issue? Thanks, Axel. [[alternative HTML version deleted]] ___

[R] DESCRIPTION FILE in R Manuals

2012-04-06 Thread Axel Urbiz
DESCRIPTION file. It shows "R Documentation" and the path "Users/name/..etc". Is there something I might be missing for the data in the DESCRIPTION file not getting into the manual? Thanks in advance, Axel. [[alternative

[R] Help with operation on list of matrices

2012-03-14 Thread Axel Urbiz
e value 1 0.3 (i.e., 0.2 + 0.1) 2 0.7 (i.e., 0.4 + 0.3) 3 0.5 (i.e., 0.5) 5 0.7 (i.e., 0.7) Any help is much appreciated. Regards, Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] Conditional cumulative sum

2012-01-26 Thread Axel Urbiz
cond= sample(c(0,1), 10, replace= T)) y cond cumsum_y.cond1 1 00 0 2 00 0 3 11 1 4 10 1 5 01 1 6 10 1 7 11 2 8 11 3 9 10 3 10 0 1 3 Thank you. Regards, Axel. [

Re: [R] Random Forests in R

2011-12-02 Thread Axel Urbiz
Thanks for this! Axel. On Thu, Dec 1, 2011 at 11:29 AM, Liaw, Andy wrote: > The first version of the package was created by re-writing the main > program in the original Fortran as C, and calls other Fortran subroutines > that were mostly untouched, so dynamic memory allocation ca

[R] Random Forests in R

2011-11-30 Thread Axel Urbiz
t mean that the implementation in R is through calls to C functions only (not Fortran)? So, would knowing C be enough to understand this code, or Fortran is also necessary? Thanks for your help Axel. [[alternative HTML version deleted]] __ R-help@r-proj

[R] R Interface to C / C++‏

2011-11-29 Thread Axel Urbiz
learning something that I can use for any later R package building projects. Thanks for any advice. Regards, Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] Question about .Fortran in glmnet package

2011-10-26 Thread Axel Urbiz
in=integer(nlam), nulldev=double(1), dev=double(nlam), alm=double(nlam), nlp=integer(1), jerr=integer(1),PACKAGE="glmnet" ) Thanks for your help. Regards, Axel. [[alternative

[R] Problem installing tweetR on Ubuntu

2011-10-19 Thread Axel Urbiz
‘twitteR’ * removing ‘/home/leo/R/x86_64-pc-linux-gnu-library/2.12/twitteR’ Regards, Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

[R] Question about Natural Splines (ns function)

2011-09-06 Thread Axel Urbiz
* mm[,3] + coefficients(glm1)[4] * mm[,4] + coefficients(glm1)[5] * mm[,5]) Regards, Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

[R] Source Code glm() question

2011-08-10 Thread Axel Urbiz
Dear List, I'm fairly new in R. I'd like to see how glm() uses the argument "family" in fitting a model. Specifically, I'd like to see how a glm with a gamma family is fitted. Thanks for any help, Axel. [[alterna

Re: [R] Help with extending glmnet

2011-07-31 Thread Axel Urbiz
x27;m similarly interested in learning the 'know how' from your first question. Thanks for this, Axel. On Sat, Jul 30, 2011 at 7:46 PM, Duncan Murdoch wrote: > On 11-07-30 5:55 PM, Axel Urbiz wrote: > >> Dear List, >> >> I'd like to extend the glmnet package to a

[R] Help with extending glmnet

2011-07-30 Thread Axel Urbiz
Dear List, I'd like to extend the glmnet package to account for one additional distribution: the Tweedie (compound of Poisson and Gamma). Could you please point me on how should I do this? Thanks for any help, Axel. [[alternative HTML version de

[R] Problem with read.shape in maptools

2011-07-23 Thread Axel Urbiz
, package="maptools")[1])Error: could not find function "read.shape" I haven't found this function on the documentation from the latest release of the package, so I assume is no longer supported. Is there an alternative way of doing this? http://rss.acs.unt.edu/Rdoc/libr

[R] SpatialPolygonsDataFrame to map conversion?

2011-07-21 Thread Axel Urbiz
it possible to create a map object from a SpatialPolygonsDataFrame object? Alternatively, is there any other function similar to smooth.map that will work with a SpatialPolygonsDataFrame? Thanks for any help, Axel. [[alternative HTML version deleted]] __

[R] Adding dash-lines in R tables

2011-05-22 Thread Axel Urbiz
is it possible to add dash lines to tables or matrices when they are printed? An example of what I'm looking for is this: library(Design) y <- sample(c(0,1),100, replace = TRUE) x <- rnorm(100) summary(y ~ x) Thanks, Axel. [[alternative HTML vers

[R] Need expert help with model.matrix

2011-05-18 Thread Axel Urbiz
- contr.treatment formals(contr.identity)$contrasts <- FALSE contrasts <- contrasts formals(contrasts)$contrasts <- FALSE However, I believe this function is using contrasts = TRUE, as it doesn't return the identity contrasts mat2 <- model.matr

[R] Help with options("contrasts")

2011-05-09 Thread Axel Urbiz
attempt below works fine, but again, I'd like to specify this in the options() as opposed to each contrast individually. model.matrix(~ a + b, dd, contrasts =list(a=ca, b=cb)) Thanks for any help! Axel. [[alternative HTML version deleted]] ___

[R] Orthoblique rotation on eigenvectors (SAS VARCLUS)

2011-04-09 Thread Axel Urbiz
TRUE, scores = TRUE) pc2 <- quartimax(pc1$loadings[,1:2],normalize=TRUE)$loadings pc3 <- scale(x%*% pc2) pc4 <- apply(x, 2, function(x) cor(x, pc3)^2) Thanks in advance for any help! Axel. [[alternative HTML version deleted]] __ R-help@r-proj

[R] Help in sub-setting a List

2011-04-04 Thread Axel Urbiz
t;- list(as.matrix(mylist[[1]][,index[[1]]]), as.matrix(mylist[[1]][,!index[[1]]]), as.matrix(mylist[[2]][,index[[2]]]), as.matrix(mylist[[2]][,!index[[2]]])) Thanks for any help, Axel. [[alternative HTML version deleted]] ___

[R] Help in splitting ists into sub-lists

2011-04-03 Thread Axel Urbiz
mylist[[1]][,index1==FALSE], mylist[[2]][,index2], mylist[[2]][,index2==FALSE]) Thanks in advance, Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch

[R] Help: creating owin{spatstat} objects from GIS data

2011-03-30 Thread Axel Urbiz
library(sp) library(maptools) con <- url("http://gadm.org/data/rda/CHE_adm1.RData";) class(con) print(load(con)) close(con) SP <- as(gadm, "SpatialPolygons") W <- as(SP, "owin") "Error in owin(poly = opls) : Polygon data contain overlaps between polygons&

[R] Help with Time Series Plot‏

2011-03-17 Thread Axel Urbiz
(rnorm(100), start=2004, freq=12), ylab="RQI", xlab="My X lab", col="black", cex.lab=0.1, cex.axis=0.7) Thanks, Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.c

[R] Reproducibility issue in gbm (32 vs 64 bit)

2011-02-25 Thread Axel Urbiz
76143 3 xc[, 2] 0.0 Thanks, Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide co

[R] Predictions with missing inputs

2011-02-11 Thread Axel Urbiz
+ X3, data=mydata) summary(mymodel) #create new data with 1 missing input mynewdata <- data.frame(matrix(rnorm(100*2),100,2)) mypred <- predict(mymodel, mynewdata) Thanks in advance for your help! Axel. [[alternative HTML version deleted]] ___

[R] Predictions with 'missing' variables

2011-01-25 Thread Axel Urbiz
t <- glm(y ~ x1 + x2, data=train) summary(myfit) all(predict(myfit, test) == predict(myfit, train)) [1] TRUE Thanks, Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-

[R] Question about glmnet

2010-10-21 Thread Axel Urbiz
Hi, Is it possible to include factor variables as model inputs using this package? I'm quite sure it is not possible, but would like to double check. Thanks, Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing

Re: [R] Lattice xyplot and groups

2010-09-24 Thread Axel
> That would be the logically correct approach. Here are a couple of > ways to specify color: That's perfect! Thank you very much. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://

[R] bctrans: Box-Cox Transformation Problem

2010-09-22 Thread Axel Kasparek
.profile.logL, hessian = TRUE, method = "L-BFGS-B", : L-BFGS-B needs finite values of 'fn' Does anybody have an idea how to cope with the data to get proper parameters for the transformation? Thanks a lot Axel Kasparek TU München __

Re: [R] Lattice xyplot and groups

2010-09-21 Thread Axel
> Does using > >     df = df[order(df$type,df$set,df$x),] > > before calling xyplot fix the problem? Thank you very much for your suggestion. It does make the lines open, but unfortunately it mixes different id together. With the new ordering the plot looks something like this: (x=-10, y_id1) ->

[R] Lattice xyplot and groups

2010-09-21 Thread Axel
Hi, I'm trying to plot many (x, y) data files using the xyplot function from the lattice package. Each file can be classified by set name (s1, s2,...) and data type (A, B, ...). Each data set contains a different number of files. If the data is grouped by type or set and visualized as line plot wi

[R] Creating functions of "many" arguments

2010-07-15 Thread Axel Urbiz
ance for your help! Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented,

[R] R on Linux - a primer

2010-03-14 Thread Axel Urbiz
Hi, I'm looking to move from Windows into a 64-bit Linux environment. Which is the best Linux Flavor to use within R? To install R on this environment, do I need to do any compiling? Thanks all! Axel. [[alternative HTML version de

[R] R on 64-Bit…

2010-02-21 Thread Axel Urbiz
packages on the CRAN repositories “ready tho use” on these systems or do I have to do any additional work to get them going? Thanks in advance for your help! Axel. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] unexpected behaviour of R-2.10.1 regular expression in UTF-8 locale

2010-01-21 Thread axel . klenk
=en_US.UTF-8;LC_IDENTIFICATION=C" > sub("^.*([[:digit:]]{2}).*$", "\\1", nn) [1] "01" "02" Is there something wrong with my regex syntax or am I missing something else? Obviously I have at least two workarounds but I'd like to report this since it is

[R] Help using "leaps" package

2009-11-10 Thread Axel Urbiz
UE TRUE TRUE FALSE TRUE TRUE TRUE 6TRUE TRUE TRUE TRUE TRUE TRUE TRUE My desired output is: (Intercept) aF2 aF3 aF4bG2 bG3bG4 3TRUE FALSE FALSE FALSE TRUE TRUE TRUE 3TRUE TRUE TRUE TRUE FALSE FALSE FALSE 6TRUE TRUE TRUE

  1   2   >