rstudio

.Rprofile not sourced

走远了吗. 提交于 2020-07-05 07:47:16
问题 I am trying to set some global options for blogdown package in ~/.Rprofile script but they are not being sourced. Here's how the .Rprofile script looks like: options(blogdown.ext = ".Rmd", blogdown.author = "Maryam Khezrzadeh") I have also tried setting the options at the project level by creating an .Rprofile script in my project's working directory. but that doesn't get sourced either. I have restarted the R session from within RStudio and have also restarted RStudio and finally restarted

How to find and replace end of a line in RStudio

一曲冷凌霜 提交于 2020-07-05 06:51:27
问题 I am working in RStudio and I would like to place a certain string at the end of every selected non-empty line of a .R script. I tried to use find and replace with regex but I am only able to select the last character of a line (using .$ ) which is not helpful as I do not want to replace this character. I have tried combinations of \n\r etc but these return no results. I am seeking a method either to "carry" the character selected by .$ into my "replace" string (I don't think this is possible

How to find and replace end of a line in RStudio

让人想犯罪 __ 提交于 2020-07-05 06:51:04
问题 I am working in RStudio and I would like to place a certain string at the end of every selected non-empty line of a .R script. I tried to use find and replace with regex but I am only able to select the last character of a line (using .$ ) which is not helpful as I do not want to replace this character. I have tried combinations of \n\r etc but these return no results. I am seeking a method either to "carry" the character selected by .$ into my "replace" string (I don't think this is possible

R - cannot access urls for package installation

大憨熊 提交于 2020-07-05 03:47:21
问题 I recently installed R Studio (Version 0.99.892) on a personal computer (windows 8) and am trying to install, among others, the following packages: ggplot2; dplyr; rmarkdown; tidyr. Neither R nor R Studio is able to install any of these packages. Each time I attempt to install a package, I get the set of warnings I include at the bottom of this post. I have used the install.packages command as well as the built-in package installation tool. I have tried several different mirrors. I have tried

“Index Match” In R Studio (multiple columns, across rows)

六月ゝ 毕业季﹏ 提交于 2020-06-28 04:04:29
问题 I'm working with a fairly large data set (100k rows) and want to replicate the Excel Index Match function in R Studio. I'm looking for a way to create a new column that will pull a value from an existing column ("1995_Number"), if 3 values from three different columns from one year match three values from three columns from another year - independent of the rows , and create a new column ("1994_Number"). Dataframe as example: dat <- data.frame(`1994_Address` = c("1234 Road", "123 Road", "321

Make R/RStudio beep play after *every* command

╄→гoц情女王★ 提交于 2020-06-27 10:18:09
问题 My question relates to making R beep after a command. I understand that I can run beep() together with whatever command I want to run, but is there a way to automatically run beep() (from beepr package) or system("say done") (I run RStudio on a Mac) after every command? e.g. is there a options() setting I can tweak so that after entering every command in the interpreter another command like beep() is executed? 回答1: You want addTaskCallback. addTaskCallback(function(...) { system("say done");

rJava can load in RStudio but not in R, OS is Ubuntu 14.04.1 LTS

心不动则不痛 提交于 2020-06-27 04:04:33
问题 I have rJava installed, it loads well in RStudio, but cannot load when I start R from Terminal, or from crontab. I've tried all possible ways I found online, what else can I do now? 0.1. Error message library(rJava) Error : .onLoad failed in loadNamespace() for 'rJava', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object '/mnt/home/dx/R/x86_64-pc-linux-gnu-library/3.0/rJava/libs/rJava.so': libjvm.so: cannot open shared object file: No such file or

How to escape “$” in R markdown and slidify it?

青春壹個敷衍的年華 提交于 2020-06-25 22:15:07
问题 When write some notes in R Markdown, I need to escape the dollar sign, making sentence within two dollar sign not a formula. I have tried \$ blah blah blah \$ and \\$ blah blah blah \\$ or even <p>$ blah blah blah </p>$ . What works is `$`. But I don't want to highlight it. ps: I want to slidify it, so both \$ and \\$ don't work. 回答1: You just need to use backslashes \ to escape, not forward slashes: Line with $\text{Math:} \frac{3}{4}$. Line with \$ escaped dollar signs \$. 来源: https:/

How to escape “$” in R markdown and slidify it?

非 Y 不嫁゛ 提交于 2020-06-25 22:15:00
问题 When write some notes in R Markdown, I need to escape the dollar sign, making sentence within two dollar sign not a formula. I have tried \$ blah blah blah \$ and \\$ blah blah blah \\$ or even <p>$ blah blah blah </p>$ . What works is `$`. But I don't want to highlight it. ps: I want to slidify it, so both \$ and \\$ don't work. 回答1: You just need to use backslashes \ to escape, not forward slashes: Line with $\text{Math:} \frac{3}{4}$. Line with \$ escaped dollar signs \$. 来源: https:/

How to escape “$” in R markdown and slidify it?

匆匆过客 提交于 2020-06-25 22:14:51
问题 When write some notes in R Markdown, I need to escape the dollar sign, making sentence within two dollar sign not a formula. I have tried \$ blah blah blah \$ and \\$ blah blah blah \\$ or even <p>$ blah blah blah </p>$ . What works is `$`. But I don't want to highlight it. ps: I want to slidify it, so both \$ and \\$ don't work. 回答1: You just need to use backslashes \ to escape, not forward slashes: Line with $\text{Math:} \frac{3}{4}$. Line with \$ escaped dollar signs \$. 来源: https:/