Skip to main content

Questions tagged [r]

R is a free, open-source programming language & software environment for statistical computing, bioinformatics, visualization & general computing. Please use minimal reproducible examples others can run using copy & paste. Show desired output entirely. Use dput() for data & specify all non-base packages with library(). Don't embed pictures for data or code, use indented code blocks instead. For statistics questions, use https://stats.stackexchange.com.

r
129,684 questions with no upvoted or accepted answers
62 votes
0 answers
2k views

How might I get detailed database error messages from dplyr::tbl?

I'm using R to plot some data I pull out of a database (the Stack Exchange data dump, to be specific): dplyr::tbl(serverfault, dbplyr::sql(" select year(p.CreationDate) year, ...
Jon Ericson's user avatar
  • 21.3k
45 votes
0 answers
1k views

Use the `pos` argument in Rgraphviz to fix node position

Based on this question Automatically curving an arc when it is overlapping with another one, I am trying to set the pos attribute in a RGraphviz plot. Can someone show how to correctly use the pos ...
user20650's user avatar
  • 25.6k
37 votes
1 answer
973 views

How to `\link{}` to a specific section of an Rd file with Roxygen2?

Say I want to link to the "Details" section of my documentation for function foo, what do I do? \link{foo:Details} doesn't appear to work, so what is the right command?
mchen's user avatar
  • 10k
36 votes
0 answers
1k views

Interactive selection in ggplotly with geom_hex() scatterplot

I am trying to create a scatterplot matrix with interactive selection between geom items in individual matrix plots. This works when I am dealing with geom_points (inside ggpairs()). When a user ...
user avatar
31 votes
0 answers
357 views

Installing error in Google Cloud using CloudML library in R

I'm trying Google Cloud for the first time for training a DNN model with using Keras in R. The use of the cloudml_train()-function try to install a lot of libraries on the Google Cloud server, and ...
Sándor Zsebők's user avatar
29 votes
0 answers
7k views

rmarkdown using kable with list of data.tables loses table formatting

I have a rmarkdown document where I want to use a list of data.tables and include them in a PDF/HTML/MS Word document. Each component of the list contains one data.table. What I'm trying to achieve ...
panman's user avatar
  • 1,311
25 votes
0 answers
816 views

How to incorporate weights into the likelihood of a WinBUGS model?

I want to incorporate weights into the likelihood of a WINBUGS model to do what brms does with weights. The usual BUGS approaches to accomplish that for dnorm and dpois are not working for dbin. In ...
Krantz's user avatar
  • 1,493
21 votes
0 answers
1k views

Error in texi2dvi running knitr::knit2pdf

If I run knit2pdf("test.Rnw") ...on a .Rnw file using knitr in R, I get this error: Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet, : Running 'texi2dvi' on 'test.tex' ...
luciano's user avatar
  • 13.7k
20 votes
2 answers
2k views

TPR & FPR Curve for different classifiers - kNN, NaiveBayes, Decision Trees in R

I'm trying to understand and plot TPR/FPR for different types of classifiers. I'm using kNN, NaiveBayes and Decision Trees in R. With kNN I'm doing the following: clnum <- as.vector(diabetes....
Kris's user avatar
  • 5,762
20 votes
3 answers
1k views

Access to MySQL with R using a pre 4.1.1 authentication protocol

I need to access to a MySQL remote server, and I want to do this with the R software. I set up the connection parameter but I can't access. I use this code: drv <- dbDriver("MySQL") library(...
user3122861's user avatar
18 votes
0 answers
313 views

Creating Spark Objects from JPEG and using spark_apply() on a non-translated function

Typically when one wants to use sparklyr on a custom function (i.e. **non-translated functions) they place them within spark_apply(). However, I've only encountered examples where a single local data ...
Matthew J. Oldach's user avatar
16 votes
2 answers
384 views

Add a horizontal discrete legend below the chart in ggvis

I'd like to make a horizontal legend below the ggvis chart. I can use legend properties to place it below the chart, but don't know how to make the labels horizontal below the legend title. Below is ...
chungkim271's user avatar
16 votes
1 answer
410 views

unconditional warnings when recycling

I'll start my question by reminding what "recycling" is, and for that, I will quote another user (re: Brian Diggs' question about Implementation of standard recycling rules): One nice feature of R ...
flodel's user avatar
  • 88.7k
15 votes
1 answer
1k views

R Shiny Apps Greys Out and Hangs

It seems that on occasion my R Shiny app appears to grey out and hang when a user first hits the site. I believe this happens because their previous web socket connection didn’t successfully terminate ...
John's user avatar
  • 345
14 votes
0 answers
13k views

how do I use @importFrom so that it applies to a whole R package?

automated data analysis workflows I have the following code in my packagename.R file in the packagename folder. I know I am going to use certain functions from other packages routinely, so I want to ...
wdkrnls's user avatar
  • 4,658

15 30 50 per page
1
2 3 4 5
8646