找不到TSclust包

时间:2015-09-21 17:27:57

标签: r time-series tsclust

我不知道出了什么问题或者如何解决问题。你能帮帮我吗?

> install.packages("TSclust")
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0100  342k  100  342k    0     0   394k      0 --:--:-- --:--:-- --:--:--  394k

The downloaded binary packages are in
    /var/folders/bk/2b2d879912bgnl5s768s7crh0000gn/T//RtmpHpu6uh/downloaded_packages
> require(TSclust)
Loading required package: TSclust
Error : .onLoad failed in loadNamespace() for 'rgl', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.0/Resources/library/rgl/libs/rgl.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.0/Resources/library/rgl/libs/rgl.so, 6): Library not loaded: /usr/X11/lib/libGLU.1.dylib
  Referenced from: /Library/Frameworks/R.framework/Versions/3.0/Resources/library/rgl/libs/rgl.so
  Reason: image not found
> 

这里有关于我的RStudio的信息:

Version 0.99.473 – © 2009-2015 RStudio, Inc.
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/600.8.9 (KHTML, like Gecko)

和R:

dyn-72-33-222-106:~ mona$ R

R version 3.2.2 (2015-08-14) -- "Fire Safety"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.4.0 (64-bit)

更新:

> install.packages("TSclust")
also installing the dependencies ‘splus2R’, ‘ifultools’, ‘proxy’, ‘clv’, ‘rgl’, ‘misc3d’, ‘wmtsa’, ‘pdc’, ‘locpol’, ‘dtw’, ‘longitudinalData’


  There are binary versions available but the source versions are later:
                    binary    source needs_compilation
rgl              0.95.1201 0.95.1337              TRUE
longitudinalData       2.3       2.4             FALSE

Do you want to install from sources the package which needs compilation?
y/n: y
trying URL 'https://cran.rstudio.com/bin/macosx/mavericks/contrib/3.2/splus2R_1.2-0.tgz'
Content type 'application/x-gzip' length 190385 bytes (185 KB)
==================================================
downloaded 185 KB

trying URL 'https://cran.rstudio.com/bin/macosx/mavericks/contrib/3.2/ifultools_2.0-1.tgz'
Content type 'application/x-gzip' length 961357 bytes (938 KB)
==================================================
downloaded 938 KB

trying URL 'https://cran.rstudio.com/bin/macosx/mavericks/contrib/3.2/proxy_0.4-15.tgz'
Content type 'application/x-gzip' length 142040 bytes (138 KB)
==================================================
downloaded 138 KB

trying URL 'https://cran.rstudio.com/bin/macosx/mavericks/contrib/3.2/clv_0.3-2.1.tgz'
Content type 'application/x-gzip' length 166056 bytes (162 KB)
==================================================
downloaded 162 KB

trying URL 'https://cran.rstudio.com/bin/macosx/mavericks/contrib/3.2/misc3d_0.8-4.tgz'
Content type 'application/x-gzip' length 151783 bytes (148 KB)
==================================================
downloaded 148 KB

trying URL 'https://cran.rstudio.com/bin/macosx/mavericks/contrib/3.2/wmtsa_2.0-0.tgz'
Content type 'application/x-gzip' length 361400 bytes (352 KB)
==================================================
downloaded 352 KB

trying URL 'https://cran.rstudio.com/bin/macosx/mavericks/contrib/3.2/pdc_1.0.2.tgz'
Content type 'application/x-gzip' length 168385 bytes (164 KB)
==================================================
downloaded 164 KB

trying URL 'https://cran.rstudio.com/bin/macosx/mavericks/contrib/3.2/locpol_0.6-0.tgz'
Content type 'application/x-gzip' length 104555 bytes (102 KB)
==================================================
downloaded 102 KB

trying URL 'https://cran.rstudio.com/bin/macosx/mavericks/contrib/3.2/dtw_1.18-1.tgz'
Content type 'application/x-gzip' length 737519 bytes (720 KB)
==================================================
downloaded 720 KB

trying URL 'https://cran.rstudio.com/bin/macosx/mavericks/contrib/3.2/TSclust_1.2.3.tgz'
Content type 'application/x-gzip' length 353039 bytes (344 KB)
==================================================
downloaded 344 KB


The downloaded binary packages are in
    /var/folders/bk/2b2d879912bgnl5s768s7crh0000gn/T//Rtmp258LNe/downloaded_packages
installing the source packages ‘rgl’, ‘longitudinalData’

trying URL 'https://cran.rstudio.com/src/contrib/rgl_0.95.1337.tar.gz'
Content type 'application/x-gzip' length 2189241 bytes (2.1 MB)
==================================================
downloaded 2.1 MB

trying URL 'https://cran.rstudio.com/src/contrib/longitudinalData_2.4.tar.gz'
Content type 'application/x-gzip' length 80334 bytes (78 KB)
==================================================
downloaded 78 KB

* installing *source* package ‘rgl’ ...
** package ‘rgl’ successfully unpacked and MD5 sums checked
checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking how to run the C preprocessor... clang -E
checking for gcc... (cached) clang
checking whether we are using the GNU C compiler... (cached) yes
checking whether clang accepts -g... (cached) yes
checking for clang option to accept ISO C89... (cached) none needed
checking whether __attribute__((visibility())) is supported... no
checking whether clang accepts -fvisibility... yes
checking whether  accepts -fvisibility... no
checking for libpng-config... yes
configure: using libpng-config
configure: using libpng dynamic linkage
checking for X... no
configure: error: X11 not found but required, configure aborted.
ERROR: configuration failed for package ‘rgl’
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rgl’
Warning in install.packages :
  installation of package ‘rgl’ had non-zero exit status
ERROR: dependency ‘rgl’ is not available for package ‘longitudinalData’
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/longitudinalData’
Warning in install.packages :
  installation of package ‘longitudinalData’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/bk/2b2d879912bgnl5s768s7crh0000gn/T/Rtmp258LNe/downloaded_packages’
> require(TSclust)
Loading required package: TSclust
Loading required package: wmtsa
Loading required package: splus2R
Loading required package: ifultools
Loading required package: MASS
Loading required package: pdc
Loading required package: cluster
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  there is no package called ‘longitudinalData’
> set.seed(12349)
> n = 100
> x <- rnorm(n) #generate sample series, white noise and a wiener process
> y <- cumsum(rnorm(n))
> w <- 20 #amount of equal-sized frames to divide the series, parameters for PAA
> alpha <- 4 #size of the alphabet, parameter for SAX
> #normalize
> x <- (x - mean(x)) /sd(x)
> y <- (y - mean(y)) /sd(y)
> paax <- PAA(x, w) #generate PAA reductions
Error: could not find function "PAA"

并且rgl:

> library(rgl)
Error in library(rgl) : there is no package called ‘rgl’
> install.packages("rgl")

  There is a binary version available but the source version is later:
       binary    source needs_compilation
rgl 0.95.1201 0.95.1337              TRUE

Do you want to install from sources the package which needs compilation?
y/n: y
installing the source package ‘rgl’

trying URL 'https://cran.rstudio.com/src/contrib/rgl_0.95.1337.tar.gz'
Content type 'application/x-gzip' length 2189241 bytes (2.1 MB)
==================================================
downloaded 2.1 MB

* installing *source* package ‘rgl’ ...
** package ‘rgl’ successfully unpacked and MD5 sums checked
checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking how to run the C preprocessor... clang -E
checking for gcc... (cached) clang
checking whether we are using the GNU C compiler... (cached) yes
checking whether clang accepts -g... (cached) yes
checking for clang option to accept ISO C89... (cached) none needed
checking whether __attribute__((visibility())) is supported... no
checking whether clang accepts -fvisibility... yes
checking whether  accepts -fvisibility... no
checking for libpng-config... yes
configure: using libpng-config
configure: using libpng dynamic linkage
checking for X... no
configure: error: X11 not found but required, configure aborted.
ERROR: configuration failed for package ‘rgl’
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rgl’
Warning in install.packages :
  installation of package ‘rgl’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/bk/2b2d879912bgnl5s768s7crh0000gn/T/Rtmp258LNe/downloaded_packages’

0 个答案:

没有答案