How to install “splits”

In this post, I will write how to install the splits package.

The easiest way to install the splits is to use install.packages. For Windows and Linux, just type on your R console,

>install.packages(“splits”, repos=”http://R-Forge.R-project.org“)

This command will automatically download the package from R-forge site and install it to your machine. (Note that R-forge only retains packages for recent versions of R. If you see error messages about R version on installation, check if your R is the latest version.)

For MacOS, the command is slightly different.

>install.packages(“splits”, repos=”http://R-Forge.R-project.org“, type=”source”)

This installs the package from the source code instead of installing from binary package. (The R-forge does not provide binary packages for MacOS.) Some users reported that the command does not work on the Mac R console. In that case, you may need to start R from Terminal and run the install.packages command on it.

You may need to install packages the splits depends on, ape, MASS and paran, before installing splits. You can also use install.packages to install them, but now from the default CRAN repository.

>install.packages(“ape”, dependencies=T)

“dependencies” is set as TRUE to make sure that further dependencies of packages will be resolved.

Once the splits is installed, you can load it by calling library function.

>library(splits)

If you see messages like below, the package was successfully installed.

Loading required package: ape
Loading required package: MASS
Loading required package: paran
>

If your network connects to the internet via proxy servers, you need to set the proxy to make install.packages work. This is usually done by setting an environmental variable on terminal in Unix like environment (and probably in Mac).

$export HTTP_PROXY=”yourproxyserver:port”

Please consult your network administrator if you don not know the name or port of your proxy server.  In Windows, you need to run R from Command prompt with a special option,

>Rgui.exe http_proxy=”yourproxyserver:port”

If this command does not solve proxy issues, you may need to modify LAN settings in Internet Options.

Advertisements

15 thoughts on “How to install “splits”

  1. Chih Wei Huang

    Dear Dr. Fujisawa,
    I’m trying to install splits, but it showed this message “Warning: dependencies ‘ape’, ‘paran’ are not available”.
    I followed the steps to >install.packages(“ape”, dependencies=T)
    The program ape was successfully installed, but paran was not.
    How can I solve this problem?

    Thanks!

    Chih-Wei

    Reply
    1. tmfujis Post author

      Hi Chih-Wei,

      Did you try installing “paran” from the CRAN repository as you did with “ape”?

      >install.packages(“paran”, dependencies=T)

      If this command works, install “splits” again.

      Tomochika

      Reply
  2. Leonardo

    Dear Dr. Fujisawa,

    I have the latest version of R (R version 3.1.0).
    I just tried to install ‘splits’, but when I did it, the following warning message appeared:
    package ‘splits’ is not available (for R version 3.1.0). This means that I can not run ‘splits’ by using my current version of R? Should I install a previous version of R to run ‘splits’?
    Thank you in advance for your reply.

    Best wishes,

    Leonardo

    Reply
    1. t.fujisawa Post author

      Hi Leonardo,

      I checked the pacakge status on the R-forge site. The package does not appear to be built for the latest R 3.1.0.
      I am trying to rebuild it now.

      For now, you could install the package from the source.
      If you saw a message like “package ‘splits’ is available as a source package but not as a binary” when you tried to install it, you can use the same option as Mac installation.

      >install.packages(“splits”, repos=”http://R-Forge.R-project.org“, type=”source”)

      Tomochika

      Reply
  3. Leonardo

    Dear Tomochika,

    Thank you very much for your prompt reply.
    I tried the same option as Mac installation, but I got the same message: package ‘splits’ is not available (for R version 3.1.0).
    I hope you will be able to rebuilt ‘splits’ to make it compatible with the new version of R. Please, let me know if you have success!
    I’m looking forward to hearing from you soon.

    Cheers,
    Leonardo

    Reply
    1. t.fujisawa Post author

      I am trying to re-build the package, but now it fails to build and even the source package is not available.
      I am sorry for this inconvenience.

      I will let you know when the package is properly built.

      Tomochika

      Reply
      1. Leonardo

        Dear Tomochika,

        Thank you, once again, for your prompt reply.
        I hope you will find the way to re-build the package.
        I’m looking forward to hearing from you,
        Leonardo

  4. Piyatida

    Could you please rebuilt ‘splits’ to make it compatible with the new version of R. Thank you.

    Reply
    1. t.fujisawa Post author

      Dear Piyatida,
      I tested with the latest version of R (version 3.2.1) in Windows, and the installation worked without errors.

      Could you let me know what type of errors you see upon installation?

      Tomochika

      Reply
      1. Piyatida

        Dear Tomochika,
        Thank you very much for your reply. I got this message “package ‘splits’ is not available (for R version 3.2.1)”. But I was success to install with R (version 3.1.0), I got the result now. Thank you very much again.

        Piyatida

  5. Izzy G

    Dear Tomochika,

    I have tried to install Splits on R, the new version 3.2.4. Is there anyway you can make Splits adapted for this version?

    Many thanks,

    Izzy

    Reply
    1. t.fujisawa Post author

      Dear Izzy,

      Did you try the install.package command?
      If the basic command doesn’t work, please try with type=”source” like

      install.packages(“splits”, repos=”http://R-Forge.R-project.org”, type=”source”)

      This command works on R 3.2.5 on my Linux computer. If type=”source” doesn’t work, please just let me know the error messages on your console.

      Tomochika

      Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s