FAQ Database Discussion Community

## Arranging subgroups in ggplot [duplicate]

r,rstudio
This question already has an answer here: Order Bars in ggplot2 bar graph 5 answers I have this set of data data<-read.table("http://pastebin.com/raw.php?i=Vb8S91LX", header=TRUE) When i plot them using ggplot, the X axis subgroup is automatically arranged as GS, i_GS and Nor for each x variable. the code i use...

## Multiple true condition in ifelse command

r,rstudio
In R we use ifelse(test, yes, no) command. The problem which i am facing is if a codiation comes out to be true i need to perform various statement, for example ifelse(fp$month==1,(fp$sum(sales_1),fp$sum(sales_2)),0) So I am giving two condition if fp$month = 1.those conditions are sum(fp$sales_1),sum(fp$sales_2), but R is recognising second...

## increasing number of members in a list causes working list to not work

r,rstudio
I am making a list with a lot of members. With small number of members, it works fine. However, increasing members beyond a point causes it to not work. I tracked down the point at which it stops working and it's listed below. However, I don't see anything suspicious in...

## RQDA batch file import not working

r,rstudio
I am trying to import multiple files into RQDA like this: #install.packages("RQDA") library(RQDA) #import list of files into program files<-list.files("C:\\Users\\blah\\Desktop\\SNA_R_Class_code\\Texts") RQDA() setwd("C:\\Users\\blah\\Desktop\\SNA_R_Class_code") openProject("me_classify_class_texts.rqda") #this is a completely empty project I just created write.FileList(files) When I look at the RDQA GUI it shows no project open, I get the following message...

## R in Ubuntu Server 14.04 - Writing file to a samba sharing in which a directory is protected by user/pass

r,file,ubuntu,rstudio,samba
I was wondering if writing to a protected samba directory, to a internal directory with another user/pass could be possible. I have been searching for an R package with these capabilities but I haven't found it yet. Now I'm using the write() function. In the documentation for this function, it...

## Plot a histogram of means and label individual mean/PDF

r,plot,rstudio
So I have this plot which is showing average scores of group of people. I would like to know how to, in the same picture, plot or lable X (see the picture, I added X with paint), where X presents the mean of one student compared to others. My code...

## In “R” iterate over specific columns

r,loops,for-loop,rstudio,lapply
Update: Thanks jason and Buckminster - I used a variation of your suggestions I used the below then adjusted for my function/data Again thanks myFun<-function(x) { myDF$multiple[grep(" Mbps",myDF[,x])] <- 1000000 myDF[,x] <- gsub(" Mbps","",myDF[,x]) myDF$multiple[grep(" Kbps",myDF[,x])] <- 1000 myDF[,x] <- gsub(" Kbps","",myDF[,x]) myDF$multiple[grep(" bps",myDF[,x])] <- 1 myDF[,x] <- gsub(" bps","",myDF[,x])... ## Setting work directory in knitr using opts_chunk$set(root.dir = …) doesn't work

r,rstudio,knitr
My R project is structured like a package with directories /R, /vignettes, /data etc. In one of my Rmd docs in /vignettes I source a script which in located in /R. Inside this script I use read.csv() to load a file located in inst/extdata/. The problem now is that by...

## Highlighting bash code with knitr / rmarkdown

r,syntax-highlighting,rstudio,knitr,rmarkdown
I'm trying to generate an HTML report using RStudio, R Markdown and knitr. In the report I would like to display some bash code. I do not want to run the code but I would like it to be highlighted. It has been mentioned in another question but the suggestion...

## Shiny selectInput produces a list of numbers

r,shiny,rstudio
am wondering why this issue is happening and if there is a fix for it. I create the following sql query below: CompanyNames<-sqlQuery(connection, paste("SELECT Companynm", " FROM RiskMgm_Company", " WHERE CompanyID = ParentID", " ORDER BY Companynm")) CompanyNames comes in the form of a database. Now no matter how I...

## Is there a way to have a barplot and a stacked barplot on the same graph using barplot or ggplot?

r,ggplot2,bar-chart,rstudio
I have two pieces of data that I want to overlay onto the same plot. I've looked at several ggplot articles and I don't think it's possible within ggplot. So I have been using barplot. I have 5 tiers and I'm plotting total dollars by tier as a solid bar....

## Trying to make the command lines start plotting from the position zero with a vector as argument

r,rstudio
I'm trying to do a task, where I have to compare the histogram of a sample with poisson distribution of size 100, with the expected frequencies that they should have, so I did this. prob0 = dpois(0, 2.5) prob1 = dpois(1, 2.5) prob2 = dpois(2, 2.5) prob3 = dpois(3, 2.5)...

## How to restrict Shiny fileInput to text files only?

shiny,rstudio
I want to restrict my file browser to displaying only the types of file I specify, e.g. .txt files only. The only relevant snippets of a code I found are like the following: fileInput("in_file", "Input file:", accept=c("txt/csv", "text/comma-separated-values,text/plain", ".csv") However, this does't filter the files showing in the browser to...

## Creating a loop with character variables on R - for two-sample t.test

r,loops,rstudio
I am looking to do multiple two sample t.tests in R. I want to test 50 indicators that have two levels. So at first I used : t.test(m~f) Welch Two Sample t-test data: m by f t = 2.5733, df = 174.416, p-value = 0.01091 alternative hypothesis: true difference in...

## Extracting text after “?” in R

r,pattern-matching,rstudio
I have a string x <- "Name of the Student? Michael Sneider" I want to extract "Michael Sneider" out of it. I have used: str_extract_all(x,"[a-z]+") str_extract_all(data,"\\?[a-z]+") But can't extract the name....

## using -knitr- to weave Rnw files in RStudio

r,rstudio,knitr
This seems to be a recurrent problem for who is willing to write dynamic documents with knitr in RStudio (see also here for instance). Unfortunately I haven't find a solution on Stack Overflow or by googling more in general. Here is a toy example I am trying to compile in...

## Is it possible to schedule a script to run automatically in RStudio server? [duplicate]

r,rstudio,rstudio-server
This question already has an answer here: Schedule R script using cron 1 answer I was just wondering if it is possible to schedule a script to run automatically (e.g. every Monday) on RStudio server?...

## Connecting RStudio with Remote R machine

r,hadoop,rstudio,rhadoop
I have RStudio installed on my Windows machine and R installed on one of the nodes of a hadoop cluster. I want to connect RStudio to that slave machine and want to run my R script. I have all the R packages required for hadoop integration installed on that slave...

## Is there an Rstudio keyboard shortcut to open up the file that contains the source code to a function you've written?

r,rstudio
I have multiple packages of my own making that I usually have loaded into my R sessions, as well as various functions specific to a small project stored in various utils files. Say I know the name of a function but want to open the particular file housing that function,...

## Running two instances of Rstudio simultaneously on Linux

r,rstudio
I've got a lengthy process running in Rstudio and I would like to open a separate session of Rstudio while the first one is running. I know I can run R from the command line to get as many sessions as I want, but I wanted to know if it...

## Missing projection file in R's rgdal package for geospatial analysis

r,rstudio,gdal,rgdal
I'm having a problem I can't solve with rgdal in which the projection file seems to be missing. This is the error I get: proj4string(d) <- CRS("+init=epsg:28992") Error in CRS("+init=epsg:28992") : no system list, errno: 2 It's confusing because when I load the package, it seems to successfully autodetect the...

## Using R Studio Console commands not parsed in Knitr markdown file

r,rstudio,knitr
Forgive the very basic question but I'm having some trouble getting the knitr feature to work just like typing in the console. To recreate Download this csv file https://s3.amazonaws.com/udacity-hosted-downloads/ud651/reddit.csv Import it into R Studio calling it reddit so it appears in the Global Environment area of the IDE, Do this...

## Errors while installing Rstudio

r,rstudio
I am trying to install Rstudio. I have downloaded the rstudio-0.98.1103-deb package. This is the error I am getting when I do: sudo dpkg -i rstudio-0.98.1103-amd64.deb How do I go about the installation? Any suggestions would be great. I am on Ubuntu 14.04. ...

## Error in RStudio with read.table(url…)

r,url,rstudio
I tried to run the code below in RStudio, it always returns the error message of connection failure. It works in RGui. Any idea why this is and how to fix it? Is it problem with my Rstudio (I'm running Windows 8)? survey <- read.table(url("ftp://ftp.ics.uci.edu/pub/machine-learning-databases/adult/adult.data"), header=FALSE, sep=",", quote="", stringsAsFactors=FALSE) Error...

## Howto include js dependencies of DT datatable in Rmarkdown using knitr and pandoc

r,datatable,rstudio,rmarkdown
Is there a way to compile RMarkdown documents with datatables produced by DT outside of RStudio? I'm trying to include a datatable widget in an RMarkdown document that I then want to convert to html using knitr and pandoc. This works fine with RStudio but if I try to do...

## Shiny + GGplot - mouse click coordinates

ggplot2,shiny,rstudio
I have a doubt in shiny ploting a GGPlot Bar Graph. I can recognize coordinates of mouse click (x,y), but I need know a value of bar (x-axis) to refresh the graph with parameter and simulate a drill-down. Anyone can help me? library(shiny) library(ggplot2) ui <- fluidPage( plotOutput("plot", click =...

## Shiny Presentation (ioslides): Custom CSS and logo Windows 7/8

css,r,shiny,rstudio
I don't yet have the rep to comment on an answer to an existing question so this a follow-up to the question: Shiny Presentation (ioslides): Custom CSS and logo This question was thought to be solved by fix 385bb28 on the Rstudio Github site. However, the issue has not resolved...

## What's the difference in using a semicolon or explicit new line in R code

r,rstudio
I originally thought that the semicolon ; was the equivalent to adding an explicit new line, e.g. x <- 1; y <- 2 is the same as x <- 1 x <- 2 Certainly the R documentation doesn't seem to make a distinction with respect to syntactically complete statements: Both...

## Keep getting errors when trying to knit a PDF using R Markdown

r,rstudio,knitr,rmarkdown
cross-post from /r/RStudio Hello everybody, So I've attempted to troubleshoot this issue for about 4 hours last night with no luck. I've looked through all the similar issues in the RStudio community and attempted all the suggested "fixes", but still haven't been able to get this darn thing to work....

## Convert a date to a day number (monday = 1, tuesday = 2) in R

r,date,numbers,rstudio,data-type-conversion
Can someone help me with the following: I have a date, for example: 3-1-2014, And I would like to convert this to the number 5, because it is a friday. So 7-1-2014 would be 1, because it is a monday. Which package/code can do this for me? Thanks...

## Change background colour of rmarkdown pdf output

r,pdf,render,rstudio,rmarkdown
I am currently using RStudio 0.98.1091 and I am trying to create a pdf document with the render function from the rmarkdown package. R script: library("rmarkdown") render("input.Rmd", "pdf_document") input.Rmd --- title: "Report" output: pdf_document --- <style> body {background-color:lightgray} </style> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> I...

## R files in capital and lowercase. Difference?

r,rstudio,file-extension
Someone gave me some "R" files. Some of them are saved with a capital "R" extension, i.e. ".R", and some are saved with a lowercase extension, i.e. ".r". I can open the lowercase ones fine, but the uppercase ones say that permission is denied? My questions: - What is a...

## Evaluate a Chunk based on the output format of knitr

r,rstudio,knitr,rmarkdown
I am a beginner in using Markdown (I am using it with R studio and knitr). I am struggling with a point that I hope you would be able to help me to figure it out. I would like a chunk to be evaluated only if the output_format of the...

## Generating LaTeX tables instead of text in Rstudio

r,latex,rstudio
I am new to latex, and would like to generate PDF tables instead of text so my example is: in my METHOD.tex file I have this text: In the first group there were: AAA: items: BBB: items2 and: CCC: items3. We assessed: EEE: implementations. Of the total: VVV: objects to...

## How to read every .csv file in R and export them into single large file

r,rstudio
Hi so I have a data in the following format 101,20130826T155649 ------------------------------------------------------------------------ 3,1,round-0,10552,180,yellow 12002,1,round-1,19502,150,yellow 22452,1,round-2,28957,130,yellow,30457,160,brake,31457,170,red 38657,1,round-3,46662,160,yellow,47912,185,red and I have been reading them and cleaning/formating them by this code b <- read.table("sid-101-20130826T155649.csv", sep = ',', fill=TRUE, col.names=paste("V", 1:18,sep="") ) b\$id<- b[1,1] b<-b[-1,] b<-b[-1,]...

## Simulating and assigning multiple vectors in R

r,vector,rstudio
I am trying to run some data to compare the Tukey's to Bonferroni's methods, but don't want to simulate the data then assign it to a vector individually. I am currently doing this but it is too time consuming. v1 = c(rnorm(100, mean = 0, sd = 1)) v2 =...

## Is there any direct method to fetch data from a Couchbase server to R Studio?

rstudio,couchbase
I'm fairly new to this issue with virtually no experience with Couchbase, so i might just overlooked some easy and direct way to access data contained in it to R Studio. Do you guys know about a solution? Do i have to process such queries through some other platforms? Any...

## savePlot() error message in R: can only copy from 'windows' devices

r,windows,rstudio
Using RStudio on a Windows 8 System gives me the following error message: Error in savePlot(filename = "123", type = c("png"), device = dev.cur()) : can only copy from 'windows' devices If I write windows() in the line before savePlot, the error message disappears but the plot is "empty". The...

## R how to use files in the same packages

r,rstudio
I am planing to do all my R scripts in the same package in order to move it easily between my friends. What I have done is created an R packages using R studio and the following files have been automatically generated: projectName.Rproj DESCRIPTION man NAMESPACE R Read-and-delete-me I created...

## suppress console output in r markdown, but keep plot

r,markdown,rstudio
Hi I have the following markdown chunk: {r, echo=FALSE,warning=FALSE,message=FALSE,error=FALSE} lapply(obj,function(x) plot(x,main="some plot") box() axis(1,at=seq(0,25,by=1))  The output is multiple plots. However I also get the console message in the pdf document underneath the plots. <Plot 1> nice plot 1! <Plot 2> nice plot 2! -- nasty horrible console output ##...

## In RStudio, can I test, build and install my current package quickly?

r,rstudio
When working on a package in RStudio, is there a quick way to test, build and install the package? I currently run: devtools::test() then install.packages(devtools::build(), repos = NULL, type = "source") ... but this seems needlessly manual. ...

## ordering non-decreasing functions then adding them in R

r,function,order,sequence,rstudio
Need help with basic R function: Firstly order non-decreasing sequence from 4 different sequences and then order those 4 sequences into one. Im totally green in programing so please make it the simplest way possible. Edit1: puting some input data as required A={3,2,1,2} B={6,7,5,8} C={12,11,9,10} D={65,43,76,13} I would like it...

## Differences in R Markdown syntax highlighting for in-line code

r,syntax-highlighting,rstudio,rmarkdown
The following minimal R Markdown file minimal.Rmd produces different minimal.html output (via "Knit HTML" in RStudio) depending on my system. The first is the result on my Windows 8 machine. The second is the result on my Windows 7 (64-bit) machine. Differences: Red syntax highlighting on in-line code in Win8...

## Error with new R 3.1.3 version

r,rstudio
I installed the new R 3.1.3. I now get the error at start up: Error in .rs.httpdPort() : attempt to apply non-function Help does not work. In example: ?get redirects to my browser. Any ideas what one could do about it? I use "7 x64" "build 7601, Service Pack 1",...

## Multiple plots in one figure in R: Error if only ONE column

r,plot,rstudio
I'm trying to combine multiple figures into one using R / RStudio. It works fine when plotting 2 by 2, 3 by 5 etc. It works an all combinations with the exception of plotting ONE column. If I DO try to plot one column using an example of the rather...

## R execute script/function during installation

r,installation,rstudio,devtools
I am developing a package and I would like to know what is the best way to execute a script at installation time. Essentially I want to make sure that third-party tools are installed, retrieve them when I can and raise an error if some dependency is missing. I am...

## Error while using rarecurve() in R

r,rstudio,vegan
I am using vegan::rarecurve on community data. lac.com.data<-wisconsin(lac.com.data) rarecurve(lac.com.data) Unfortunately, I am getting an error and cannot figure out how to fix it. Error in seq.default(1, tot[i], by = step) : wrong sign in 'by' argument I tried rarecurve(lac.com.data,step=1) to no avail. I already generated a tabasco() graph and performed...

## Split the title onto multiple lines?

r,yaml,markdown,rstudio
In an R markdown document (html and presentations), is it possible to manually split the title onto multiple lines? I tried playing with pipes which produces orrendous output. --- title: 'A title I want to split on two lines' author: date: output: ioslides_presentation --- ...

## How to create venn diagram in R studio from group of three frequency column

r,rstudio,data-analysis
How to create a venn diagram in R from dataFrame: user has_1 has_2 has_3 3431 true false true 3432 false true false 3433 true false false 3434 true false false 3435 true false false 3436 true false false There are thousands such row. I want to show how many users...

## Rmarkdown directing output file into a directory

r,rstudio,knitr,rmarkdown
I found a really nice trick (link) to a function of knitr, where you can save your output html into an output folder and under a different filename. The only thing you have to head to the header is the following: title: "analysis" author: "Me" date: "`r format(Sys.time(), '%d %B,...

## Modifying a Tukey HSD 95% family-wise CL plot in Rstudio

r,plot,rstudio
I wanted to know how I could change the axis of a plot of Tukey's HSD so I could shorten the words to make each comparison fit and not look ridiculous. It would help a lot if you could help me with codes for changing axis labels, font size and...

## looking at the next column in a data frame based on a condition in previous column

r,rstudio
Say I have a data frame as follows which has classes(Low,Medium,High) and some values against it. So, in the first row, 0.7 and 0.25 are the chance of High,and, 0.99 is the chance of Medium, and 0.11 is the chance of Low. col1 col2 col3 col4 col5 col6 col7 col8...

## Render font size of maths in Rmarkdown slides when viewed in then Rstudio viewer

r,markdown,rstudio,rmarkdown,mathjax
Writing some slides for lecture. I want to include a shiny app. I do not have admin rights on the lecture room computer, which means I can run my Rmd file and present the slides via the Rstudio viewer, but they will not display in a web browser. All the...

## How do I put multiple boxplots in the same graph in R?

r,plot,ggplot2,rstudio,boxplot
Sorry I don't have example code for this question. All I want to know is if it is possible to create multiple side-by-side boxplots in R representing different columns/variables within my data frame. Each boxplot would also only represent a single variable--I would like to set the y-scale to a...

## .Rd file generation in a package using Rcpp

r,rstudio,rcpp
I created a test package containing Rcpp code using Rcpp.package.skeleton() command. All the required files as per vignette were generated and I was able to compile the package. I tried to add roxygen2 style comments to the example code #include <Rcpp.h> using namespace Rcpp; //' @param none required //' @return...

## Plotting Modeled Data as my Regression Curve in R/RStudio

r,rstudio
I have two numerical data sets; one experimental, and one modeled. I have plotted the data set as a scatter plot in R. The experimental data are: x=c(1.11,2.84,3.97,6.40,7.60,7.43,5.75,3.60,3.59) y=c(0.973,0.818,0.74,0.44,0.2688,0.282,0.50,0.613,0.656) This is a pretty straight forward scatter plot. I also have some modeled data I acquired using an equation. This data...

## convert NA in a column of class factor to 0

r,rstudio
I have a column of type factor. Some of the values in the columns are NA values. How do I convert all these NA values to a new level, say 0, or "OriginallyNA" or something. I was able to convert NAs to 0 for columns of class numeric, but haven't...

## R/RStudio, Yosemite, and Java

java,r,rstudio,osx-yosemite
I upgraded to OSX Yosemite yesterday. When I run library(xlsx) in RStudio, the program crashes and I get the message: "To open 'RStudio' you need to install the legacy Java SE 6 runtime." I get the same result and message about opening R when I run library(xlsx) in R. Here...

## Rstudio 0.98.1028 add background image only to title slide

css,r,rstudio,rmarkdown
I am attempting to create a R Presentation (.Rpres) using RStudio 0.98.1028 with a different background image on the title slide and another background image on the rest of the slides. I am able to place a custom background (foo.png) by creating a css file with this in it: body...

## finding rows which don't have NA in a particular column if it already didn't have any NA

r,rstudio
I just observed that if one of the columns in my data frame does not contain any NA values(see col2 below) and I unknowingly, try to find rows which do not have the corresponding col2 value as NA, the below code gives me an empty output. See col1 below where...

## operating on sub group inside data frame very slow

r,rstudio
I have a data frame containing data about number of pushups done by different people(represented by id column) on four days of a week. I have to do the following Find a running sum(cumulative cost) of the pushups for each id At each day, I want to add a column...

## What programming language was RStudio written in?

rstudio
What makes me curious is that when you right click anywhere on RStudio, it has the option "inspect element". I suspect it has to do with Javascript, but unsure.

## Sourcing the code

r,rstudio
If my .R file name is too large, or the location of that file is (name ) is too big. I observed that If I hit the return key in between the location it is throwing an error. Is there any way to writing the file location in two lines...

## how to extract specific paragraphs from a text file in R [closed]

regex,r,rstudio,text-processing
I'm using R studio to process a text file which has textual data in the following form: * A name A date A referene number A text....bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla...

## Running R and RStudio on Dropbox [duplicate]

r,dropbox,rstudio
This question already has an answer here: Run R from dropbox 2 answers For a collaborative project can you install RStudio (and R itself) on a shared dropbox folder, as well as run the script from that same location? If yes, is there a special procedure that should be...

## Problems with edges in R plotting

r,graph,plot,rstudio,edges
I'm having a hard time dealing with cutting edges in R plots. The problem: Code: x <- c(130, 145, 170, 175, 180) y <- c(0.00172225, 0.00207025, 0.002304, 0.0025, 0.002704)*1000 plot(x,y,pch=20) fit <- lm(y~x) xx <- seq(120,190, length=50) plot(x,y,xlab=(expression('U'~~'[V]')),main=expression(atop(Something)), ylab=expression(r[1]^2~~"[mm]"),pch=19,xlim=c(120, 190), ylim=c(0.001,0.003)*1000) xHigh <- x+5 yHigh <- y+c(0.083, 0.091, 0.096, 0.100,...

## Show and report function outputs in “R” programming language

r,rstudio
In R programming language and package pcaPP I have this code: # multivariate data with outliers library(mvtnorm) library(pcaPP) x <- rbind(rmvnorm(200, rep(0, 6), diag(c(5, rep(1,5)))), rmvnorm( 15, c(0, rep(20, 5)), diag(rep(1, 6)))) # Here we calculate the principal components with PCAgrid pc <- PCAproj(x) Here is documentation for the output...

## Copy/paste table into gmail

r,gmail,rstudio
This is probably an easy answer, but I can't find anything online about it. Is there an easy way to copy/paste a table from the R console to an email message?

## Converting non-standard file to .csv in R

r,file,csv,rstudio,file-conversion
Some of the output files I use are non-standard, space delimited formats with non-standard extensions (.out) that only have meaning to a particular program I use. For example, I might get an output file for water budgets that looks like: waterbalance.out I can open these files in Excel by opening...

## sjplot sjt.frq in new window / tab

r,table,tabs,rstudio,sjplot
after you helped me a lot the other day, I'm back with a new question, and I hope you'll support me just as well ;-) This time, I'm working with sjPlot in order to get "pretty" tables. I managed to create a really nice contingency and another table providing me...

## Source R script using 32 bit R from 64 bit RStudio

r,rstudio
On Win7 I have both 32 bit and 64 bit R installed. Because one can't ODBC to 32 bit MS Access from 64 bit R, I want to source an R script using the 32 bit version of R. From this SO question I understand that I can launch 32...

## Is there any way to disable environment pane in RStudio?

r,rstudio
Introduction: I have an RStudio project where I'm researching (fairly) big data sets. Though I'm trying to keep global environment clean, after some time it becomes filled with huge objects. Problem: RStudio always refreshes Environment pane after debugging (probably iterates global environment and calls summary() on each object), and it...

## Finding the period with the highest rolling sum per category

r,rstudio
Here's the thing. I have rather large set of data (1,5 million rows) that represents 40k clients and some metrics about them for each of 40+ months, so data looks more or less like this: CLIENTID| MONTHID| VALUE --------|--------|------- client1 | month1 | value1 client1 | month2 | value2 client1...

## The error when publishing a shiny app

r,shiny,rstudio,shinyapps
I want to publish my shiny app. For this I created an account in https://www.shinyapps.io/ Then, in RStudio, I go to Tools->Shiny Apps->Publish Apps and paste the token, account and secret information. Finally, I get the error: Error: /v1/users/current/ 426 - shinyapps package out of date. To update visit: https://github.com/rstudio/shinyapps...

## RStudio character encoding issue: quotation marks replaced by \x92

r,character-encoding,rstudio,rstudio-server
I am reading.csv a file containing some naturally occurring text. Sometimes in the text, ' is used to serve as an apostrophe, sometimes ’ is used instead (see lines 2 and 6 of this table). When reading the file in RStudio on my laptop, I have no issue (both '...

## Save View() output of RStudio as html

r,rstudio
Is it possible to save the page which I see when use View() command in RStudio on some data as an html file?

## RStudio internal PDF viewer

latex,rstudio
Over RStudio documentation, it mentions an internal PDF viewer (using PDF.js): https://support.rstudio.com/hc/en-us/articles/200552066-PDF-Preview-and-SyncTeX I have no such option. Only "Evince" or "No Preview". Using Ubuntu / RStudio 0.98.1102. How do I activate the internal viewer?...