You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
miniCRAN::addPackage calls miniCRAN::makeRepo and that function trips on the bold code (see if conditional) because the variable fromLocalRepos is a vector of logicals and the “if” statement doesn’t like the vector of length > 1 in the conditional. Here are the warnings after running the addPackage line:
Warning messages:
1: In if (fromLocalRepos) { :
the condition has length > 1 and only the first element will be used
2: In normalizePath(path.expand(path), winslash, mustWork) :
path[2]="http://download.mosek.com/R/8": The specified path is invalid
3: In normalizePath(path.expand(path), winslash, mustWork) :
path[3]="https://mran.microsoft.com/snapshot/2017-03-15": The specified path is invalid
4: In gsub(repoPath, path, downloaded) :
argument 'pattern' has length > 1 and only the first element will be used
My example works only because my local repository is first element of repos.x variable. If I reorder repos.x and define it instead as shown below with the local repository last in the vector, the source packages in my local repository are no longer copied to the miniCRAN repository because the first element of fromLocalRepos logical vector is now FALSE and the if statement fails. Is there a workaround or does this require a bug fix?
Scenario
ascCRAN.path
below) where I build source packages using RStudio.miniCRAN
repository (see variableminiCRAN.path
) that contain all the packages that need to be releasedrepos.x
)addPackage
to add packages from my local repository and their dependencies to myminiCRAN
repositoryIssue
miniCRAN::addPackage
callsminiCRAN::makeRepo
and that function trips on the bold code (see if conditional) because the variablefromLocalRepos
is a vector of logicals and the “if” statement doesn’t like the vector of length > 1 in the conditional. Here are the warnings after running theaddPackage
line:Warning messages:
My example works only because my local repository is first element of
repos.x
variable. If I reorderrepos.x
and define it instead as shown below with the local repository last in the vector, the source packages in my local repository are no longer copied to theminiCRAN
repository because the first element offromLocalRepos
logical vector is now FALSE and theif
statement fails. Is there a workaround or does this require a bug fix?The text was updated successfully, but these errors were encountered: