R sommer package - version out of date message [closed] - r

Closed. This question needs debugging details. It is not currently accepting answers.
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.
Closed 4 years ago.
Improve this question
Using the sommer package quite extensively I often get messages telling my version is out of date even though I'm using the latest version of the package. This can be especially annoying when using sommer in some sort of loop.
Is there a way to avoid these messages?

Hi BartJan welcome to SO!
Have you tried calling the library with quietly = TRUE?
library(sommer,quietly = TRUE)
If that doesn't work, you can make R suppress all messages and warnings:
suppressMessages(suppressWarnings(require(xyz)))

Related

How to create this chart in R? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
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.
Closed 3 years ago.
Improve this question
I have a task a bit complicated for my knowledge in R. I need to reproduce this graphic of the figure in R, I performed several searches and could not find anything. The main thing is to be able to reproduce the graphic (it doesn't have to be identical), subtitles are not so important. Any ideas on how to do it or just using another program? Thanks!!
Check also the facet_share() function of the ggpol package, very handy for population pyramids/comparisons

Error message about username when using plotly r package offline [closed]

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'm trying to begin using plotly for R, but I'm having trouble with an error about username. When I try to execute the following code...
test=ggplot(diamonds,aes(x=diamonds$carat,y=diamonds$price))+geom_point()
test2=plotly(test)
plotly(test)
...I get the error message:
Storing 'username' as the environment variable 'plotly_username'
Error in Sys.setenv(plotly_username = username) :
wrong length for argument
I thought plotly's R package was available for use without a username via htmlwidgets. As far as I can tell, I'm using the latest version of plotly, ggplot, and htmlwidgets. What am I doing wrong?
You have to use ggplotly()
So,
test <- ggplot(diamonds,aes(x = carat,y = price))+ geom_point()
ggplotly(test)

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.

working directory with spaces in R [closed]

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.

Not able to install packages in R with install.packages() [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
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.

Resources