If your code needs a specific R package, it is not sufficient to just install that. You will also have to load that package before using it.
Try to load using library(markovchain)
and then run your codes.
If you still come across same problem, please share a reproducible example as GreyMerchant suggested.
Edit (reply to post 5)
First of all, use triple backticks (```
) instead of quotes in future to format code blocks, and single backtick for small one line code snippets. And please use >
to block quote a paragraph, like an error message.
Regarding the error you posted, it is highly likely to that package was installed successfully. What I mean by that it may be the case that it has some other packages as dependencies, which were not installed.
Can you try to install it again? If you install by clicking RStudio buttons, there should be one where you can tick whether to install dependencies or not. If you use install.packages
, specify dependencies
as TRUE
.
I hope that will solve the problems with library
command. If not, you can post back again and someone from our community will try to help you solve this. Good luck!
Edit (reply to post 6)
You got the formatting almost correct. For backticks you have to do this:
```
First line of code
Second line of code
...
Last line of code
```
No need to specify 3 backticks in every line. The problem with that is it can no longer be copy pasted directly in console. There's a FAQ for code formatting for the community, you can check that out.
Regarding your post, you didn't include full error. If Rtools is not installed, your install command should fail and return messages like non zero exit status.
Rtools is a different software, and not a R package. You can download relevant version from CRAN, depending on your R version, and then you have to add it to path. Afterwards, try to install again. Amd if you fail again, no worries and post back.
Hope this helps!