簡體   English   中英

為什么我不能使用爆發包?

[英]Why I can't work with outbreaker package?

我在使用爆發者 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,然后重新安裝爆發者

> 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’
> 

我該如何解決? 謝謝

試試這個@ArTu,

按照以下方式安裝“Outbreaker”包並查看。

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

我認為這絕對可以解決您的問題。 我試過安裝看看。 它工作正常。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM