Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 5 years ago.
Improve this question
When typing accented characters (á, é, í, ó, etc.) in the source section in RStudio, they don't display correctly. I'll give two examples to explain:
When I try typing this:
"Ótrúlega óþolandi þegar ég skrifa íslenska stafi."
this appears as:
"´ótr´úlega ´óþolandi þegar ´ég skrifa ´íslenska stafi"
(translation: "Incredibly annoying when I write Icelandic letters.")
When I try typing this:
"ááóóééíía"
this appears as:
"´á´áá´ááó´ááóó´ááóóé´ááóóéé´ááóóééí´ááóóééíía"
(translation: This is nonsense...)
I have no idea why this is happening. I'm using RStudio on Mac. Any help would be greatly appreciated.
It seems like this was a bug in RStudio. I installed the latest version of RStudio and this problem disappeared.
Related
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 days ago.
Improve this question
In R studio, I entered the following code:
summary(chickwts)
attach (chickwts)
barplot(chickwts$weight,main="Individual Weights,ylab="Weight")
Am using R 4.2.2 for Windows in R Studio environment. Code was from a course in TGC called "Learning Statistics, Concepts and Applications in R". Error message says comma the problem but this is the code that the course give. Am not sure how to proceed to get the barplot.
Any help appreciated.
I used the code the course gave, and it didn't work.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 6 years ago.
Improve this question
Actually, I'm having trouble with importing a CSV file in my script in Rstudio. I am trying:
d <- read.table(file="table1.csv",sep="\t",header=T)
but it says that there is an error in file and "rt".
Type 'getwd()' in the console. If what returns isn't the same path as the file you're trying to read in, change this with setwd("[your filepath here]"). If you want a graphical solution instead, you can use the Set As / Go To Working Directory commands under the 'More' menu in RStudio's Files viewer (bottom right window).
Then try d <- read.csv("table1.csv")
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 6 years ago.
Improve this question
I'm working on Slackware and I'm trying to change my working directory in order to import a xlsx.
setwd("</home/diego/Downloads>")
Error in setwd("</home/diego/Downloads>") :
cannot change working directory
This happens when directory path is wrong. Two steps may solve this:
First, check what's your current working directory in terminal or use getwd() with R
Second, setwd("path") according to your current working directory, for example, setwd("diego/downloads"), setwd("../../abc/def"), certainly you should drop the < and >
Drop the < and > from the directory name.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 5 years ago.
Improve this question
Looking to read in an .xlsx file. This is an assignment so I specifically can't use Excel first to convert it to .csv.
Tried using read.xlsx which couldn't be found so I tried 'library(xlsx)' which was not a package according to R.
Does anyone know if there's something glaringly obvious that I'm not doing? Is the package called something different? Is there a different/better way to read an xlsx file?
Thanks!
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 5 years ago.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Improve this question
I am having the problem that when I use setwd() with a path that includes spaces (e.g. setwd("C:/Users/Name/My Documents/") I get the error message
"cannot change working directory"
I am a bit suprised that I did not find much about this here or on google - so it must either be a rare error or everyone knows about it I reckon. Either way, is there a why to work around it?
I am using Windows 7 and R version 3.0.2.
R cannot setwd into a directory that it doesn't have 'x' (execute) permission for.
This should work, but if really needed, you can use the function shortPathName.
> shortPathName("C:/Program Files (x86)/Adobe/")
[1] "C:\\PROGRA~2\\Adobe\\"
I can replicate your error if I just copy and paste
setwd("C:/Users/Name/My Documents/")
to console as is. The problem is that R cannot find the specified path. I believe that you should replace "Name" with your username...
If I replace "Name" with my username, it works as expected.