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!
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 5 years ago.
Improve this question
Bit of a newbie for R, R Studio and Markdown but I am trying to use the render() function on my Rmd file and I get the following error:
Error: could not find function "render"
If I try to use the following I get this error:
markdown::render("MarkdownExample.Rmd")
Error: 'render' is not an exported object from 'namespace:markdown'
Still yesterday I could use the render fonction without any problem. Would anyone know what to do?
Thanks in advance
Shouldn't it be rmarkdown::render?
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 am new to R and now I have an issue while I try to read CSV files in a loop. My CSV files are named as
result_file_1.csv , result_file_2.csv,....result_file_10.csv
So I planned to read a CSV by the below code:
for(i in 1:10){
t1=read.csv("result_file_i.csv")
// rest of my code
}
I also tried:
for(i in 1:10){
t1=read.csv("result_file_"+i+".csv")
// rest of my code
}
both did not work. Any help is appreciated
As suggested above I used paste0("result_file",i,".csv") and it worked fine.
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
Im taking an R programming class that is using the package "matplot" for a demo. I cant find "matplot" in CRAN so i'm assuming it has been replaced/deleted/changed. Is there another package that replaced it?
There is a matplot function within the graphics library. Here's an example from the documentation:
require(grDevices)
matplot((-4:5)^2, main = "Quadratic")
Also, matplot is a plotting library for PHP. Perhaps your instructor could help clarify what is expected.
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")