Anaconda r studio installing - r

Trying to install r studio on anaconda but keep having problems. I tried from prompt:
conda install -c r rstudio
but got the error below:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: -
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
Examining rstudio: 75%|████████████████████████████████████████████████▊ | 3/4 [00:01<00:00, 2.51it/s]|failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Output in format: Requested package -> Available versions
Package vs2015_runtime conflicts for:
python=3.9 -> libzlib[version='>=1.2.11,<1.3.0a0'] -> vs2015_runtime[version='>=14.15.26706|>=14.27.29016|>=14.28.29325|>=14.29.30139|>=14.32.31332|>=14.29.30037']
python=3.9 -> vs2015_runtime[version='>=14.16.27012,<15.0a0|>=14.16.27012|>=14.16.27033']
Package openssl conflicts for:
python=3.9 -> openssl[version='>=1.1.1h,<1.1.2a|>=1.1.1i,<1.1.2a|>=1.1.1j,<1.1.2a|>=1.1.1k,<1.1.2a|>=1.1.1l,<1.1.2a|>=1.1.1n,<1.1.2a|>=1.1.1o,<1.1.2a|>=3.0.3,<4.0a0|>=3.0.2,<4.0a0|>=3.0.0,<4.0a0|>=1.1.1q,<1.1.2a']
python=3.9 -> pypy3.9=7.3.9 -> openssl[version='>=3.0.5,<4.0a0']
Package libzlib conflicts for:
python=3.9 -> libzlib[version='>=1.2.11,<1.3.0a0']
python=3.9 -> pypy3.9=7.3.9 -> libzlib[version='>=1.2.12,<1.3.0a0|>=1.2.13,<1.3.0a0']
Package zlib conflicts for:
python=3.9 -> pypy3.9=7.3.9 -> zlib[version='>=1.2.11,<1.3.0a0|>=1.2.12,<1.3.0a0']
rstudio -> freetype[version='>=2.9.1'] -> zlib[version='>=1.2.11,<1.3.0a0|>=1.2.13,<1.3.0a0']
rstudio -> zlib[version='>=1.2']
Package vc conflicts for:
python=3.9 -> bzip2[version='>=1.0.8,<2.0a0'] -> vc[version='9.*|>=14,<15.0a0|>=14.2,<15']
python=3.9 -> vc[version='>=14.1,<15|>=14.1,<15.0a0']
Package sqlite conflicts for:
python=3.9 -> pypy3.9=7.3.9 -> sqlite[version='>=3.39.1,<4.0a0']
python=3.9 -> sqlite[version='>=3.33.0,<4.0a0|>=3.34.0,<4.0a0|>=3.35.5,<4.0a0|>=3.36.0,<4.0a0|>=3.37.0,<4.0a0|>=3.37.1,<4.0a0|>=3.38.5,<4.0a0|>=3.39.3,<4.0a0|>=3.39.2,<4.0a0|>=3.38.2,<4.0a0|>=3.38.0,<4.0a0|>=3.35.4,<4.0a0']

Related

conda create R environment

How can I create afresh conda environment with R support and RStudio?
The code below fails to work for me:
conda create -n datascience-r rstudio
Collecting package metadata (current_repodata.json): done
Solving environment: failed with current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Package r-stringr conflicts for:
rstudio -> r-stringr[version='>=0.6']
Package qt conflicts for:
rstudio -> qt=5.6
Package r-httpuv conflicts for:
rstudio -> r-httpuv[version='>=1.3.3']
Package r-readxl conflicts for:
rstudio -> r-readxl[version='>=0.1.0']

Installing specific R package from specific branch from github repo on travis-ci

I am developing a package which depends on a different package of mine which is still on github. I am using travis-ci to test the package. I added the following to the .travis.yml file to install the dmdScheme package from the dev branch:
language: r
r_github_packages: r-lib/remotes#340
r_github_packages: rkrug/dmdScheme#dev
but I get the following error at travis
Installing R packages from GitHub: rkrug/dmdScheme#dev
0.19s$ Rscript -e 'remotes::install_github(c("rkrug/dmdScheme#dev"))'
Error in parse_repo_spec(repo) :
Invalid git repo specification: 'rkrug/dmdScheme#dev'
Calls: <Anonymous> -> lapply -> FUN -> parse_git_repo -> parse_repo_spec
Execution halted
The command "Rscript -e 'remotes::install_github(c("rkrug/dmdScheme#dev"))'" failed and exited with 1 during .
The remotes package is installed.
My question:
What is the correct syntax, to specify the branch (or ref in general) to be used in the command r_github_packages?
As we can see at the Devtools dependencies vignette, we can use # to specify specific commits, etc. So, you need:
r_github_packages: rkrug/dmdScheme#dev

Clean and Rebuild a Package with Packrat alongside in RStudio

Coming from a python playground and being a big fan of virtualenv and ofcourse, a rookie in R, I intended to have a similar setup in my R projects and packages with the aid of packrat. (At least it seemed intuitive.)
So far, without packrat, I would run "Clean and Rebuild" on my package in RStudio and things worked as expected.
But now I have packrat installed and initialized on the project, which in turn, routes all the subsequent installs to the lib folder in the /packrat dir. This again is working as expected.
Now the issue is with rebuilding my package (which is btw, installed into the packrat by means of packrat::install() )
Every time I run "Clean and Rebuild" I get the following error in the Build window of RStudio:
==> roxygen2::roxygenize('.', roclets = c('rd', 'collate', 'namespace'))
Error in loadNamespace(name) : there is no package called ‘roxygen2’
Calls: suppressPackageStartupMessages ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
Exited with status 1.
In reality, I have devtools, roxygen2 and other packages (including my own) installed with packrat.
What Am I missing?

log4net in .net core 2.0 console application

When using log4net from Microsoft.Extensions.Logging.Log4Net.AspNetCore 2.2.4 running
dotnet publish -c release -r win81-x64
causes these errors:
:: error NU1605: Detected package downgrade: System.Net.NameResolution from 4.3.0 to 4.0.0. Reference the package directly from the project to select a different version.
:: error NU1605: DailyPieChartUpdate -> Microsoft.Extensions.Logging.Log4Net.AspNetCore 2.2.4 -> log4net 2.0.8 -> System.Net.Sockets 4.1.0 -> runtime.win.System.Net.Sockets 4.3.0 -> System.Net.NameResolution (>= 4.3.0)
:: error NU1605: DailyPieChartUpdate -> Microsoft.Extensions.Logging.Log4Net.AspNetCore 2.2.4 -> log4net 2.0.8 -> System.Net.NameResolution (>= 4.0.0)
:: error NU1605: Detected package downgrade: System.Net.Primitives from 4.3.0 to 4.0.11. Reference the package directly from the project to select a different version.
:: error NU1605: DailyPieChartUpdate -> Microsoft.Extensions.Logging.Log4Net.AspNetCore 2.2.4 -> log4net 2.0.8 -> System.Net.Sockets 4.1.0 -> runtime.win.System.Net.Sockets 4.3.0 -> System.Net.Primitives (>= 4.3.0)
:: error NU1605: DailyPieChartUpdate -> Microsoft.Extensions.Logging.Log4Net.AspNetCore 2.2.4 -> log4net 2.0.8 -> System.Net.Sockets 4.1.0 -> System.Net.Primitives (>= 4.0.11)
Restore failed in 588.96 ms
Any advice?
Step 1 is to go into your project files and make sure you have references to only one version of log4net,
Step 2 is to clean your local nuget packages
Step 3 is to get all the nuget packages again
hopefully, that solves your problem
it is a good idea to reference the latest log4net version for .net core.
Maybe I'm answering too much time later, but...
The problem I thought is caused because some of your already imported libraries on your project are downgrades of the imported libraries that Microsoft.Extensions.Logging.Log4Net.AspNetCore nuget are referencing.
There are other users that have problems with the same issue. You can check this github issue to find out what is the solution.
Sorry by the inconveniences.

Julia does not update its packages

I installed DifferentialEquations by using:
Pkg.add("DifferentialEquations")
Then I used the below line to check the version:
Pkg.status("DifferentialEquations")
It returns 1.0.0 while, it must be 4.0.0.
I tried Pkg.update() or Pkg.update("DifferentialEquations). However, the version is still 1.0.0 and re-installing Julia did not help neither.
What can be done to update the DifferentialEqautions package?
The version of Julia is 0.6.2.
Edit
This time I not only uninstalled Julia, but I also deleted its folder in appdata. After installing Julia again and adding the package, now it is up to date.
Have you tried :
Pkg.pin("DifferentialEquations",v"4.0.0")
You can force Pkg to find a solution by giving an explicit version.
For example, going from version 5 to version 6 of the DifferentialEquations package:
(TestProject) pkg> status
Status `/tmp/TestProject/Project.toml`
[0c46a032] DifferentialEquations v5.0.0
(TestProject) pkg> add DifferentialEquations#6.0.0
Resolving package versions...
Updating `/tmp/TestProject/Project.toml`
[0c46a032] ↑ DifferentialEquations v5.0.0 ⇒ v6.0.0
Updating `/tmp/TestProject/Manifest.toml`
[1520ce14] - AbstractTrees v0.2.1
[79e6a3ab] - Adapt v1.0.0
[4fba245c] ↓ ArrayInterface v2.3.1 ⇒ v0.1.1
[9e28174c] - BinDeps v1.0.0
...
(TestProject) pkg> status
Status `/tmp/TestProject/Project.toml`
[0c46a032] DifferentialEquations v6.0.0
The equivalent API syntax:
julia> import Pkg
julia> Pkg.add(Pkg.PackageSpec(; name="DifferentialEquations", version=v"6.0.0"))

Resources