0

I am new to jupyter, and I am looking to install an R package (tseries) that is available on CRAN

I was trying to follow a question that was raised, but I think I am getting a different problem.

I was originally following this link

conda - How to install R packages that are not available in "R-essentials"?

But it seems obvious that the answer direct me to another link which is

https://www.continuum.io/content/conda-data-science

under the Building a conda R package

They said to run

conda skeleton cran ldavis

and then I got the following

C:\Users\Rami>conda skeleton cran ldavis
Tip: install CacheControl (conda package) to cache the CRAN metadata
Fetching metadata from http://cran.r-project.org/
Tip: install CacheControl (conda package) to cache the CRAN metadata
Traceback (most recent call last):
  File "d:\Users\Rami\Anaconda3\Scripts\conda-skeleton-script.py", line 5, in <module>
    sys.exit(conda_build.cli.main_skeleton.main())
  File "d:\Users\Rami\Anaconda3\lib\site-packages\conda_build\cli\main_skeleton.py", line 65, in main
    return execute(sys.argv[1:])
  File "d:\Users\Rami\Anaconda3\lib\site-packages\conda_build\cli\main_skeleton.py", line 61, in execute
    api.skeletonize(package, args.repo, config=config)
  File "d:\Users\Rami\Anaconda3\lib\site-packages\conda_build\api.py", line 192, in skeletonize
    recursive=recursive, config=config, **kwargs)
  File "d:\Users\Rami\Anaconda3\lib\site-packages\conda_build\skeletons\cran.py", line 527, in skeletonize
    raise RuntimeError("directory already exists: %s" % dir_path)
RuntimeError: directory already exists: .\r-ldavis

Please help me in steps as I am really new to this on windows 10

Community
  • 1
  • 1
rsc05
  • 3,626
  • 2
  • 36
  • 57
  • If R packages aren't in conda, you should be able to install them inside R using the normal `install.packages()` function. – Thomas K Oct 07 '16 at 10:52
  • Thank you thomas, but I thought there is a different way. However, even if this was the way I have two version of R installed one that is anaconda and another which is the regular R. – rsc05 Oct 07 '16 at 11:21
  • It *should* install into whichever version of R you run that function inside. I say 'should' because I'm not 100% sure that it will, but try it. You can try to turn an R package into a conda package as you've described, but it's probably more complexity than it's worth. – Thomas K Oct 07 '16 at 19:26
  • 1
    For what its worth, the error seems quite clear - simply delete the existing `r-ldavis` directory. Does that work? The `conda skeleton cran ldavis` works perfectly for me – darthbith Oct 08 '16 at 00:16

1 Answers1

0

Thank you all for your remarks but the easiest way I found for not worrying about the r directory is through downloading the package directly from jupyter using the following command

install.packages('tseries', repos='http://cran.us.r-project.org')

This worked fine for me.

rsc05
  • 3,626
  • 2
  • 36
  • 57