microsoft-r

Change a dynamic variable name with rxSetVarInfo

妖精的绣舞 提交于 2019-12-11 08:08:32
问题 Trying to change a variable name of an XDF with rxSetVarInfo. I want to merge several data sets with common var names. (I know rxMerge can/will append to filenames where needed. I want to have more control than that.) This works: outLetter<- "A" exp <- list(pct.A = list(newName = paste0("X.pct.",outLetter))) rxSetVarInfo(varInfo = exp, data = tempXDFFile) That's where I know the original column name, pct.A . What if that's dynamic? What if this is in a function that gets called several times

different result by transforms and transformFunc in rxDatastep

情到浓时终转凉″ 提交于 2019-12-11 04:59:47
问题 I would like to add a new column in an xdf file. I tested both transforms and transformFunc in rxDatastep. This line of code works fine for me: rxDataStep(nyc_jan_xdf,transforms = list(newCol5=ifelse(payment_type==1,10,20))) but If I use transformFunc: CashVsCard<-function(x) { if(x$payment_type==1){ x$newCol13=10 } else { x$newCol13=20 } return(x) } rxDataStep(nyc_jan_xdf,transformFunc = CashVsCard) it doesnt work and returns this error: Error in doTryCatch(return(expr), name, parentenv,

Error: could not find function “rxGetOption” in Revolution R Open

女生的网名这么多〃 提交于 2019-12-10 22:27:07
问题 I downloaded and installed Revolution R Open. Current Version of R is 3.1.1 (2014-07-10) -- "Sock it to Me" and version of Revolution R Open is 8.0 beta. I have started basic tutorial from converting data to .xdf format(internal to Revolution). myTrainCsv <- file.path(rxGetOption("data"), "train.csv") However I receive a following error: Error in file.path(rxGetOption("data"), : could not find function "rxGetOption" It seems to me a newbie error. Anyway I can not find an answer just googling

SQL 2016 with R - Error HRESULT 0x80004004

蓝咒 提交于 2019-12-10 10:11:11
问题 I am working through a number of tutorials on using SQL and R. But when I am trying to Run the R Script to obtain the 'ggplot' library I am getting the following error Msg 39004, Level 16, State 20, Line 1 A 'R' script error occurred during execution of 'sp_execute_external_script' with HRESULT 0x80004004. Msg 39019, Level 16, State 1, Line 1 An external script error occurred: Error in library("ggplot2") : there is no package called 'ggplot2' Calls: source -> withVisible -> eval -> eval ->

lme() different results each run under Revolution R (MKL to blame?)

 ̄綄美尐妖づ 提交于 2019-12-08 20:10:08
问题 Update (Aug 2014): I never got to the bottom of this, and never got any feedback on Revolution's forum. This issue, however, seems to have been fixed in Revolution R 7.2 (with R 3.0.3, again the academic version). I ran the lme() test below a few hundred times, all produced equal results, as expected.[ end of update ] I just installed the academic version of Revolution R 7.0 (R 3.0.2) on a new PC and am getting strange results for the code below. Every time the code is run, it gives different

Error converting rxGlm to GLM

此生再无相见时 提交于 2019-12-08 08:01:40
问题 I'm having a problem converting rxGlm models to normal glm models. Every time I try and covert my models I get the same error: Error in qr.lm(object) : lm object does not have a proper 'qr' component. Rank zero or should not have used lm(.., qr=FALSE). Here's a simple example: cols <- colnames(iris) vars <- cols[!cols %in% "Sepal.Length"] form1 <- as.formula(paste("Sepal.Length ~", paste(vars, collapse = "+"))) rx_version <- rxGlm(formula = form1, data = iris, family = gaussian(link = 'log'),

Link the R Package Depending on RcppEigen with MKL in Microsoft R Open

[亡魂溺海] 提交于 2019-12-06 08:11:03
问题 I have built a custom package with some functions written in RcppEigen. I also have Microsoft R open with Intel MKL enabled. How could I link the R package to the Intel MKL feature? Setup 1 : Below are procedures that I have tried to link the package with MKL in the normal R, but failed: The Eigen documents says I need: 1. #define EIGEN_USE_MKL_ALL 2. link your program to MKL libraries (the MKL linking advisor) Based on 2, in my file Makevars PKG_CXXFLAGS = -I/opt/intel/mkl/include PKG_LIBS =

SQL 2016 with R - Error HRESULT 0x80004004

别说谁变了你拦得住时间么 提交于 2019-12-06 01:18:54
I am working through a number of tutorials on using SQL and R. But when I am trying to Run the R Script to obtain the 'ggplot' library I am getting the following error Msg 39004, Level 16, State 20, Line 1 A 'R' script error occurred during execution of 'sp_execute_external_script' with HRESULT 0x80004004. Msg 39019, Level 16, State 1, Line 1 An external script error occurred: Error in library("ggplot2") : there is no package called 'ggplot2' Calls: source -> withVisible -> eval -> eval -> library Error in ScaleR. Check the output for more information. Error in eval(expr, envir, enclos) :

Link the R Package Depending on RcppEigen with MKL in Microsoft R Open

*爱你&永不变心* 提交于 2019-12-04 13:43:49
I have built a custom package with some functions written in RcppEigen. I also have Microsoft R open with Intel MKL enabled. How could I link the R package to the Intel MKL feature? Setup 1 : Below are procedures that I have tried to link the package with MKL in the normal R, but failed: The Eigen documents says I need: 1. #define EIGEN_USE_MKL_ALL 2. link your program to MKL libraries ( the MKL linking advisor ) Based on 2, in my file Makevars PKG_CXXFLAGS = -I/opt/intel/mkl/include PKG_LIBS = ${LAPACK_LIBS} ${BLAS_LIBS} ${FLIBS} -L/opt/intel/mkl/lib/intel64 -Wl,--no-as-needed -lmkl_intel

How to plot interaction effects from extremely large data sets (esp. from rxGlm output)

醉酒当歌 提交于 2019-12-03 11:17:00
I am currenlty computing glm models off a huge data data set. Both glm and even speedglm take days to compute. I currently have around 3M observations and altogether 400 variables, only some of which are used for the regression. In my regression I use 4 integer independent variables ( iv1 , iv2 , iv3 , iv4 ), 1 binary independent variable as factor ( iv5 ), the interaction term ( x * y , where x is an integer and y is a binary dummy variable as factor). Finally, I have fixed effects along years ff1 and company ids ff2 . I have 15 years and 3000 conmpanies. I have introduced the fixed effects