Почему я не могу работать с пакетом outbreaker? - PullRequest
2 голосов
/ 03 марта 2020

У меня слишком много проблем с использованием пакета outbreaker r ... Я устанавливал и удалял несколько раз ...

Теперь у меня есть эта ошибка:

install.packages("outbreaker")
library(outbreaker)
data(fakeOutbreak)
attach(fakeOutbreak)

И это ошибка:

The following object is masked _by_ .GlobalEnv:

    res

Если я пытаюсь удалить пакет, я получаю это:

> remove.packages("outbreaker")
Removing package from ‘C:/Users/vale/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
Error in yaml.load(readLines(con), error.label = error.label, ...) : 
  object 'C_unserialize_from_yaml' not found
Error in yaml.load(readLines(con), error.label = error.label, ...) : 
  object 'C_unserialize_from_yaml' not found
Error in yaml.load(readLines(con), error.label = error.label, ...) : 
  object 'C_unserialize_from_yaml' not found

Если я пытаюсь работать, я получаю это:

> data(fakeOutbreak)
> attach(fakeOutbreak)
The following object is masked _by_ .GlobalEnv:

    res

> mu <- get.mu(res, genome.size=ncol(dat$dna))
Error in get.mu(res, genome.size = ncol(dat$dna)) : 
  burnin too high - no chain left
> hist(mu, col="grey",
+      main="Inferred distribution of mu",
+      xlab="mutations/site/day")
Error in hist(mu, col = "grey", main = "Inferred distribution of mu",  : 
  object 'mu' not found
> abline(v=1e-4,lty=2, lwd=4, col="royalblue")
Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : 
  plot.new has not been called yet
> mtext(side=3, "Dashed line = actual value")
Error in mtext(side = 3, "Dashed line = actual value") : 
  plot.new has not been called yet

По предложению @ mischva11 я попытался установить yaml снова, а затем переустановить outbreaker

> install.packages("yaml")
Error in install.packages : Updating loaded packages
Error in yaml.load(readLines(con), error.label = error.label, ...) : 
  object 'C_unserialize_from_yaml' not found
Error in yaml.load(readLines(con), error.label = error.label, ...) : 
  object 'C_unserialize_from_yaml' not found
Error in yaml.load(readLines(con), error.label = error.label, ...) : 
  object 'C_unserialize_from_yaml' not found

Restarting R session...

Loading required package: copula
Error in yaml.load(readLines(con), error.label = error.label, ...) : 
  object 'C_unserialize_from_yaml' not found
In addition: Warning message:
package ‘copula’ was built under R version 3.4.4 
Error in yaml.load(readLines(con), error.label = error.label, ...) : 
  object 'C_unserialize_from_yaml' not found
Error in yaml.load(readLines(con), error.label = error.label, ...) : 
  object 'C_unserialize_from_yaml' not found
> install.packages("yaml")
Error in install.packages : Updating loaded packages
Error in yaml.load(readLines(con), error.label = error.label, ...) : 
  object 'C_unserialize_from_yaml' not found
Error in yaml.load(readLines(con), error.label = error.label, ...) : 
  object 'C_unserialize_from_yaml' not found
Error in yaml.load(readLines(con), error.label = error.label, ...) : 
  object 'C_unserialize_from_yaml' not found

Restarting R session...

Loading required package: copula
Error in yaml.load(readLines(con), error.label = error.label, ...) : 
  object 'C_unserialize_from_yaml' not found
In addition: Warning message:
package ‘copula’ was built under R version 3.4.4 
Error in yaml.load(readLines(con), error.label = error.label, ...) : 
  object 'C_unserialize_from_yaml' not found
Error in yaml.load(readLines(con), error.label = error.label, ...) : 
  object 'C_unserialize_from_yaml' not found
> install.packages("yaml")
Error in install.packages : Updating loaded packages
Error in yaml.load(readLines(con), error.label = error.label, ...) : 
  object 'C_unserialize_from_yaml' not found
Error in yaml.load(readLines(con), error.label = error.label, ...) : 
  object 'C_unserialize_from_yaml' not found
Error in yaml.load(readLines(con), error.label = error.label, ...) : 
  object 'C_unserialize_from_yaml' not found
> install.packages("yaml")
Installing package into ‘C:/Users/vale/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)

  There is a binary version available but the source version is later:
     binary source needs_compilation
yaml  2.2.0  2.2.1              TRUE

Do you want to install from sources the package which needs compilation?
Error in yaml.load(readLines(con), error.label = error.label, ...) : 
  object 'C_unserialize_from_yaml' not found
Error in yaml.load(readLines(con), error.label = error.label, ...) : 
  object 'C_unserialize_from_yaml' not found
Error in yaml.load(readLines(con), error.label = error.label, ...) : 
  object 'C_unserialize_from_yaml' not found
y/n: y
installing the source package ‘yaml’

trying URL 'https://cran.rstudio.com/src/contrib/yaml_2.2.1.tar.gz'
Content type 'application/x-gzip' length 92670 bytes (90 KB)
downloaded 90 KB

* installing *source* package 'yaml' ...
** package 'yaml' successfully unpacked and MD5 sums checked
** libs

*** arch - i386
C:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -I. -DNDEBUG         -O3 -Wall  -std=gnu99 -mtune=generic -c api.c -o api.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -I. -DNDEBUG         -O3 -Wall  -std=gnu99 -mtune=generic -c dumper.c -o dumper.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -I. -DNDEBUG         -O3 -Wall  -std=gnu99 -mtune=generic -c emitter.c -o emitter.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -I. -DNDEBUG         -O3 -Wall  -std=gnu99 -mtune=generic -c implicit.c -o implicit.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -I. -DNDEBUG         -O3 -Wall  -std=gnu99 -mtune=generic -c loader.c -o loader.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -I. -DNDEBUG         -O3 -Wall  -std=gnu99 -mtune=generic -c parser.c -o parser.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -I. -DNDEBUG         -O3 -Wall  -std=gnu99 -mtune=generic -c r_emit.c -o r_emit.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -I. -DNDEBUG         -O3 -Wall  -std=gnu99 -mtune=generic -c r_ext.c -o r_ext.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -I. -DNDEBUG         -O3 -Wall  -std=gnu99 -mtune=generic -c r_parse.c -o r_parse.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -I. -DNDEBUG         -O3 -Wall  -std=gnu99 -mtune=generic -c reader.c -o reader.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -I. -DNDEBUG         -O3 -Wall  -std=gnu99 -mtune=generic -c scanner.c -o scanner.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -I. -DNDEBUG         -O3 -Wall  -std=gnu99 -mtune=generic -c writer.c -o writer.o
C:/Rtools/mingw_32/bin/gcc -shared -s -static-libgcc -o yaml.dll tmp.def api.o dumper.o emitter.o implicit.o loader.o parser.o r_emit.o r_ext.o r_parse.o reader.o scanner.o writer.o -LC:/PROGRA~1/R/R-34~1.3/bin/i386 -lR
installing to C:/Users/vale/Documents/R/win-library/3.4/yaml/libs/i386

*** arch - x64
C:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -I. -DNDEBUG         -O2 -Wall  -std=gnu99 -mtune=generic -c api.c -o api.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -I. -DNDEBUG         -O2 -Wall  -std=gnu99 -mtune=generic -c dumper.c -o dumper.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -I. -DNDEBUG         -O2 -Wall  -std=gnu99 -mtune=generic -c emitter.c -o emitter.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -I. -DNDEBUG         -O2 -Wall  -std=gnu99 -mtune=generic -c implicit.c -o implicit.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -I. -DNDEBUG         -O2 -Wall  -std=gnu99 -mtune=generic -c loader.c -o loader.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -I. -DNDEBUG         -O2 -Wall  -std=gnu99 -mtune=generic -c parser.c -o parser.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -I. -DNDEBUG         -O2 -Wall  -std=gnu99 -mtune=generic -c r_emit.c -o r_emit.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -I. -DNDEBUG         -O2 -Wall  -std=gnu99 -mtune=generic -c r_ext.c -o r_ext.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -I. -DNDEBUG         -O2 -Wall  -std=gnu99 -mtune=generic -c r_parse.c -o r_parse.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -I. -DNDEBUG         -O2 -Wall  -std=gnu99 -mtune=generic -c reader.c -o reader.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -I. -DNDEBUG         -O2 -Wall  -std=gnu99 -mtune=generic -c scanner.c -o scanner.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.3/include" -DNDEBUG -I. -DNDEBUG         -O2 -Wall  -std=gnu99 -mtune=generic -c writer.c -o writer.o
C:/Rtools/mingw_64/bin/gcc -shared -s -static-libgcc -o yaml.dll tmp.def api.o dumper.o emitter.o implicit.o loader.o parser.o r_emit.o r_ext.o r_parse.o reader.o scanner.o writer.o -LC:/PROGRA~1/R/R-34~1.3/bin/x64 -lR
installing to C:/Users/vale/Documents/R/win-library/3.4/yaml/libs/x64
Warning in file.copy(files, dest, overwrite = TRUE) :
  problem copying .\yaml.dll to C:\Users\vale\Documents\R\win-library\3.4\yaml\libs\x64\yaml.dll: Permission denied
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
  converting help for package 'yaml'
    finding HTML links ... fatto
    as.yaml                                 html  
    read_yaml                               html  
    write_yaml                              html  
    yaml.load                               html  
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (yaml)
In R CMD INSTALL

The downloaded source packages are in
    ‘C:\Users\vale\AppData\Local\Temp\RtmpYHKnKP\downloaded_packages’
> library(yaml)
> install.packages("outbreaker")
Installing package into ‘C:/Users/vale/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/outbreaker_1.1-8.zip'
Content type 'application/zip' length 319541 bytes (312 KB)
downloaded 312 KB

package ‘outbreaker’ successfully unpacked and MD5 sums checked
Warning in install.packages :
  cannot remove prior installation of package ‘outbreaker’

The downloaded binary packages are in
    C:\Users\vale\AppData\Local\Temp\RtmpYHKnKP\downloaded_packages
Error in yaml.load(readLines(con), error.label = error.label, ...) : 
  object 'C_unserialize_from_yaml' not found
Error in yaml.load(readLines(con), error.label = error.label, ...) : 
  object 'C_unserialize_from_yaml' not found
Error in yaml.load(readLines(con), error.label = error.label, ...) : 
  object 'C_unserialize_from_yaml' not found
> library(outbreaker)
Error in library(outbreaker) : there is no package called ‘outbreaker’
> library(outbreaker)
Error in library(outbreaker) : there is no package called ‘outbreaker’
> 

Как мне решить? Спасибо

1 Ответ

0 голосов
/ 06 марта 2020

Попробуйте это @ ArTu,

Установите пакет "Outbreaker" следующим образом и посмотрите.

install.packages("outbreaker", dependencies = TRUE)

Я думаю, что это определенно должно решить вашу проблему. Я попытался установить и посмотреть. Работает нормально.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...