Is there a way in R to enter passwords interactively to the command line and hide them from the screen? I know there's readLine, but I do not know passwords can be hidden there.... moreIs there a way in R to enter passwords interactively to the command line and hide them from the screen? I know there's readLine, but I do not know passwords can be hidden there. Assume you want to connect to a database using ROracle or RMySQL and do not want to store the password in a script but rather make the user enter it every time a query is executed.
Yes, we had a similar question around here, but I feel that the situation has changed and it's worth to address to problem again. Unfortunately tcltk won't work on RStudio (Server).
However I have seen the folks at R Studio found a solution for their version control support. I remember previous versions where I could see my repo password every time I enter it in R Studio, but now that seems to be fixed. I know it's likely R Studio technique, but is there a way mortal R users can access it when working with R Studio Server? less
I need to "industrialize" an R code for a data science project, because the project will be rerun several times in the future with fresh data. The new code should be really easy... moreI need to "industrialize" an R code for a data science project, because the project will be rerun several times in the future with fresh data. The new code should be really easy to follow even for people who have not worked on the project before and they should be able to redo the whole workflow quite quickly. Therefore I am looking for tips, suggestions, resources and best-practices on how to achieve this objective.
Thank you for your help in advance!
I've been exploring the xgboost package in R and went through several demos as well as tutorials but this still confuses me: after using xgb.cv to do cross validation, how does... moreI've been exploring the xgboost package in R and went through several demos as well as tutorials but this still confuses me: after using xgb.cv to do cross validation, how does the optimal parameters get passed to xgb.train? Or should I calculate the ideal parameters (such as nround, max.depth) based on the output of xgb.cv?
param <- list("objective" = "multi:softprob",
"eval_metric" = "mlogloss",
"num_class" = 12)
cv.nround <- 11
cv.nfold <- 5
mdcv <-xgb.cv(data=dtrain,params = param,nthread=6,nfold = cv.nfold,nrounds = cv.nround,verbose = T)
md <-xgb.train(data=dtrain,params = param,nround = 80,watchlist = list(train=dtrain,test=dtest),nthread=6) less
I am facing problem while downloading 'caret' package in R studios. The code below was taken from the caret documentation.
install.packages("caret", dependencies = c("Depends",... moreI am facing problem while downloading 'caret' package in R studios. The code below was taken from the caret documentation.
install.packages("caret", dependencies = c("Depends", "Suggests"))
it works fine while installing but it gives Errors and Warnings while unpacking few packages like mentioned below:
ERROR: dependencies ‘eiPack’, ‘ei’, ‘MCMCpack’, ‘Zelig’ are not available for package ‘ZeligEI’
* removing ‘/home/shazil/R/x86_64-pc-linux-gnu-library/3.4/ZeligEI’
Warning in install.packages :
installation of package ‘ZeligEI’ had non-zero exit status
At the end when the whole installation process is finished it says:
The downloaded source packages are in
‘/tmp/RtmpeiP5GO/downloaded_packages’
After that when I use the library() command, the following Error appears
> library(caret)
Error in library(caret) : there is no package called ‘caret’
I am using Ubuntu 16.04, Dell machine Core i5 7th Gen, 6GB RAM AMD RADEON GRAPHICS
Would really appreciate... less
Any browser that encounter the text www.domain.com or http://domain.com/etc/ in a text section of some html will automatically translate it into <a... moreAny browser that encounter the text www.domain.com or http://domain.com/etc/ in a text section of some html will automatically translate it into <a href="http://www.domain.com">www.domain.com</a> or <a href="http://domain.com/etc/">http://domain.com/etc/</a> tag. I have to clean-up and verify some texts like this and do this replacement automatically, but the problem is that i can't insert new tags into an element's string.
#!/usr/bin/python
# -*- coding: utf8
import re
from bs4 import BeautifulSoup as bs
We are confused on the difference between R and R studio. We do the majority of our work on R studio but we were required to download R as well. Is regular R necessary for R... moreWe are confused on the difference between R and R studio. We do the majority of our work on R studio but we were required to download R as well. Is regular R necessary for R studio to work?
I installed R studio 1.2.1335 in my Pc powered by Win 7 x64. after installation when i try to open R studio shows error "api-ms-win-crt-runtime-l1-1-0.dll is missing" how to fix... moreI installed R studio 1.2.1335 in my Pc powered by Win 7 x64. after installation when i try to open R studio shows error "api-ms-win-crt-runtime-l1-1-0.dll is missing" how to fix this error?
I tried to reinstall R studio, but problem continuous
what is the difference between linq to sql class and entity framework and what kind of situation linq to sql should use and when entity framework will be the best option.
I have been using Knitr via R-Studio, and think it is pretty neat. I have a minor issue though. When I source a file in an R-Chunk, the knitr output includes external comments as... moreI have been using Knitr via R-Studio, and think it is pretty neat. I have a minor issue though. When I source a file in an R-Chunk, the knitr output includes external comments as follows:
+ FALSE Loading required package: ggplot2
+ FALSE Loading required package: gridExtra
+ FALSE Loading required package: grid
+ FALSE Loading required package: VGAM
+ FALSE Loading required package: splines
+ FALSE Loading required package: stats4
+ FALSE Attaching package: 'VGAM'
+ FALSE The following object(s) are masked from 'package:stats4':
I have tried to set R-chunk options in various ways but still didn't seem to avoid the problem:
```{r echo=FALSE, cache=FALSE, results=FALSE, warning=FALSE, comment=FALSE, warning=FALSE}
source("C:/Rscripts/source.R");
I'm trying to install ROracle package on a unix box. The package gets installed properly. But library(ROracle) does not work fine with the error
library(ROracle)
Error in... moreI'm trying to install ROracle package on a unix box. The package gets installed properly. But library(ROracle) does not work fine with the error
library(ROracle)
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/u01/group1/home/oracle/R/x86_64-redhat-linux-gnu-library/3.1/ROracle/libs/ROracle.so':
libclntsh.so.11.1: cannot open shared object file: No such file or directory
Error: package or namespace load failed for ‘ROracle’
The package installs fine from the command line , but just does not work in R studio. I went through lot of threads in forum and lot of them suggested to export the LD_LIBRARY_PATH and reset it.infact i went ahead and copied all the R system variables from command line into R Studio. But it still does not work out fine.
One thing i have also noticed is that the R system variables change every time i restart R studio. Can it be the problem that R studio is not taking path values correctly. less
In every project I've tried to create in Android Studio, all usages of R are marked in red with the error message "cannot resolve symbol R", but the compilation succeeds and the... moreIn every project I've tried to create in Android Studio, all usages of R are marked in red with the error message "cannot resolve symbol R", but the compilation succeeds and the application runs. This is really annoying, as it blocks auto-completion and shows huge red waved lines all over my code.
I'm running Android Studio 1.7.0 and creating the project with default settings. A screenshot is attached:
This is my build.gradle:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.4'
}
}
apply plugin: 'android'
Related question here.
So I have a character vector with currency values that contain both dollar signs and commas. However, I want to try and remove both the commas and dollar... moreRelated question here.
So I have a character vector with currency values that contain both dollar signs and commas. However, I want to try and remove both the commas and dollar signs in the same step.
This removes dollar signs =
d = c("$0.00", "$10,598.90", "$13,082.47") gsub('\\$', '', d)
This removes commas =
library(stringr) str_replace_all(c("10,0","tat,y"), fixed(c(","), "")
I'm wondering if I could remove both characters in one step.
I realize that I could just save the gsub results into a new variable, and then reapply that (or another function) on that variable. But I guess I'm wondering about a single step to do both. less