rstudio

apply RStudio editor themes to help files

流过昼夜 提交于 2021-01-29 10:13:14
问题 This is a follow-up question to a previous answer I got. Can I apply RStudio editor themes to help files? @Allan Cameron hinted that this is possible in his answer but I can't get it to work. My knowledge of css is poor but this page says that RStudio themes ( .rstheme file ) are just css files: Since an rstheme is just CSS, anything that you can do with CSS you can do in an rstheme. so I thought I could bring in some of that css code into my help files ( css version) to change colouring etc.

VCRUNTIME140.dll is missinig error, even though it is installed

馋奶兔 提交于 2021-01-29 09:59:29
问题 I downloaded R and Rstudio, though when I tried opening the Rstudio I got VCRUNTIME140.dll is missing error, although I do have it installed on my computer. How can I fix it? I have found similar questions here but they were all regarding C++ which seems to have an impact on the way to deal with the problem, so irrelevant for me. 来源: https://stackoverflow.com/questions/63817990/vcruntime140-dll-is-missinig-error-even-though-it-is-installed

RStudio data viewer showing Greek characters instead of English

点点圈 提交于 2021-01-29 08:39:33
问题 I am a newbie, loading data ( data(iris) ) into R. Everything is fine but when I do View(iris) , the Species names in the table are shown in a different language. Wondering if there's a bug or something? Please see an example below. Some details that might be helpful in understanding the issue: R version 4.0.1 (2020-06-06) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 18362) locale: 1 LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252 LC

Using Subscripts and Superscripts in R console

有些话、适合烂在心里 提交于 2021-01-29 03:08:25
问题 This is more for curiosity, but is it possible to write subscripts in R console and, if so, how would I do that? I am using a Mac and typically code in RStudio Although assignment statements work with Greek letters, e.g. μ,σ, but I can't get superscripts or subscripts working. I'd like to write an assign statement such as σ² <- 1 and have it be recognized. In particular, typing that last command I get the following error message Error: unexpected input in "σ�" 回答1: You can , but you shouldn't

Cannot install httr package in R 3.6.2 in Linux Mint 19.3

岁酱吖の 提交于 2021-01-28 21:17:47
问题 I am totally new to R. I tried to install the httr package. I first installed pacman, and then tried to load httr through it by running pacman::p_load(httr) . It wasn't successful. And it showed the following message in terminal- Installing package into ‘/home/|username|/R/x86_64-pc-linux-gnu-library/3.6’ (as ‘lib’ is unspecified) also installing the dependencies ‘curl’, ‘openssl’ trying URL 'https://cloud.r-project.org/src/contrib/curl_4.3.tar.gz' Content type 'application/x-gzip' length

R Session Aborted when loading package

◇◆丶佛笑我妖孽 提交于 2021-01-28 19:56:51
问题 My RStudio (0.99.879, R 3.2.3, OSX 10.11.3) crashes with the R Session Aborted error box every time I run require(ggvis) (v0.4.2). I've reinstalled R, RStudio and ggvis - no change. Any idea what's causing this, or how to traceback? Running Sys.getenv() gives me this report, if it helps. 回答1: Sometimes startup errors like this can be caused by out-of-date dependent packages. You can try updating the packages that ggvis depends on with: db <- available.packages() deps <- tools::package

Rstudio no autocomplete with Rcpp Armadillo?

我的梦境 提交于 2021-01-28 19:12:52
问题 I have long used Rcpp with Rstudio, but recently I lost autocomplete and diagnostic functionality. I was able to trace the cause to RcppArmadillow. Here is the basic default c++ new file code with modifications. #include <Rcpp.h> using namespace Rcpp; // [[Rcpp::depends(RcppArmadillo)]] // [[Rcpp::export]] NumericVector timesTwo(NumericVector x) { return x * 2; } // [[Rcpp::export]] double GetValueAt(const NumericMatrix& x, int row = 1, int col = 1) { return x(row-1,col-1); } /*** R timesTwo

Why don't parallel jobs print in RStudio?

心已入冬 提交于 2021-01-28 14:32:17
问题 Why do scripts parallelized with mclapply print on a cluster but not in RStudio? Just asking out of curiosity. mclapply(1:10, function(x) { print("Hello!") return(TRUE) }, mc.cores = 2) # Hello prints in slurm but not RStudio 回答1: None of the functions in the 'parallel' package guarantee proper displaying of output sent to the standard output (stdout) or the standard error (stderr) on workers. This is true for all types of parallelization approaches, e.g. forked processing ( mclapply() ), or

RStudio: Disable output of a code in Source Window while writing RMarkdown Document

浪子不回头ぞ 提交于 2021-01-28 09:27:18
问题 I recently updated my RStudio and while writing an R Markdown document in the Source Window, whenever I run a code in a chunk of the RMD, the output is shown in the source window itself in the following manner. It gets too messy when there are huge plots. Would like to disable this feature if possible and revert back to good old style of displaying output in the Console/Plot viewer window only. Output executed and visible below the Chunk in the Source Window Thanks 回答1: Try this in Rstudio.

Adjust RStudio console width programmatically

坚强是说给别人听的谎言 提交于 2021-01-28 09:21:46
问题 I'm using tibble's glimpse function that prints output adjusted to RStudio's console width. To get the most descriptive output, I want RStudio's console width to be large (something like 180). How do I set the width using code and not manually? getOption("width") or options("width")[[1]] returns the width, but I cannot set it to a value as that throws an error. Edit: I've even tried setting width using options("width" = 180) . This step although edits width parameter but does not expand