Not able to install packages in R with install.packages() [closed] - r

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
I have installed R Version 3.0.2. I am trying to run association analysis on a dataset.
While trying to install the arules package, using the code:
install.packages(“arules”)
I get and error:
Error: unexpected input in "install.packages(“arules")
Can you guide as to how I can install this package and use it to run association on an imported txt file using R?

You appear to be using "smartquotes" instead of straight quotes like " around arules. R cannot recognize these. Change to straight quotes and everything should work.

Related

Need Help in coding [closed]

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.

render function not recognised in R Studio [closed]

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?

Function error in R "setnames" [closed]

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 made an upgrade in R, and since then, I have a lot of errors in programs which were working well before.
The one I cannot go around is :
Error: could not find function "setnames"
I am loading the packages (
library(plyr)
library(dtplyr)
library(tidyr)
library(lsr)
library(ggplot2)
library(stats)
and i am using R :
platform x86_64-w64
major 3
minor 3.2
Does anybody knows how to go around please ?
It's probably a typo, if you're referring to setNames in stats.
Remember to capitalize the 'n'.
See https://stat.ethz.ch/R-manual/R-devel/library/stats/html/setNames.html
(The other possibility is that you may not have loaded the data.table package. See, for example, Using data.table::setnames() when some column names might not be present)

"there is no package called 'xlsx'": having trouble reading .xlsx file [closed]

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!

R can't find function after installing package [closed]

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 7 years ago.
Improve this question
I'm trying to use the function isdigit but R can't find it, even after I installed the qmrparser package and submitted the code library(qmrparser).
(I'm brand new to R so please explain like I'm 5!)
Try
library(qmrparser)
to load / attach the package. Failing that, try
qmrparser::isdigit()
to call it up explicitly using the :: operator along with the package name.
You can have thousands of packages installed, so installed does not automate loading (though you can arrange for that, but that is a different topic).
Edit: And if the function is not accessible even after loading try the 'triple-:' operator to access non-exported sysmbols:
qmrparser:::isdigit()
Edit 2: Your premise was wrong as the function is called isDigit with a capital-D. So you have to type
isDigit()
which will get you the function as it is exported via NAMESPACE.

Resources