Note that this page provides installation instructions for R. If you want to install loon
for Tcl
then follow the instructions here.
loon
in RStudio or within a terminal.
loon
.R
GUI will not accept debug messages from Tcl
, so for now you need to use RStudio or the terminal.XQuartz
while R
is running! Otherwise you end up crashing the active R
session (including RStudio
).libtk-img
debian package (e.g. with sudo apt-get install libtk-img
) in order to get a wide variety of export formats with the l_export
function.loon
use the Issue tracker on github.l_export
function then take screenshots:
loon
manually on a Windows machine with an R version that is less than 3.4.0
then you need install Tcl
version 8.6 and link R against it, see the instructions here.The loon
package is available on CRAN. To install the package start your R
and run
install.packages('loon')
You can also install the latest development release directly from GitHub with the following R code
devtools::install_github("great-northern-diver/loon", subdir="R")
The following packages are used in loon
's examples and demos. Note that these packages are not needed to install loon
, they are just nice to have to run all the examples and demos. You can skip this step and check if your loon
installation was successful.
We split the code to install the suggested packages into four sections as not all the packages are easy to install.
First, these packages from CRAN should install without any issues
install.packages(c('loon.data','maps',
'sp','RColorBrewer',
'rworldmap', 'scales'))
The following packages on Bioconductor should also install without any issues
source("https://bioconductor.org/biocLite.R")
biocLite(c('graph', 'RDRToolbox', 'Rgraphviz'),
suppressUpdates=TRUE, suppressAutoUpdate=TRUE)
The following packages on CRAN have dependencies that might need special care
On Ubuntu install the following packages first (from bash)
sudo apt install mesa-common-dev libglu1-mesa-dev freeglut3-dev\
libssl-dev libcurl4-gnutls-dev libtk-img libxml2-dev
install.packages(c(
'dplyr', 'rgl',
'PairViz', 'scagnostics',
'kernlab', 'testthat',
'knitr', 'rmarkdown',
'formatR'
))
In R
enter
library(loon)
p <- with(iris, l_plot(x=Sepal.Length, y=Sepal.Width, color=Species))
If this creates a scatterplot and an inspector loon was correctly installed. Follow the steps in the UI section and the Learn section to learn how to use loon
.
On Linux and OS X it is advisable to install the ImageScale Tcl extension for fast image resizing. loon
will use the compiled C
code for image resizing when available.
The TEA setup of ImageScale
for Windows does currently not work. If you know how to change the makefile.vc
in the win folder so that the ImageScale
package also compiles under Windows then please .
Note that only part of loon
's functionality is documented on this webpage. However, most of loon
's features are used in the R
documentation manuals, R
package demos and R
package vignettes.
To get an index of all help entries run
help(package = "loon")
To get a listing of all of loon
's demos enter
demo(package="loon")
Run a particular demo as follows
demo("l_timeseries")
To get the location of the source code of a particular demo (e.g. l_timeseries
) use
system.file("demo", "l_timeseries.R", package = "loon")
To get a list of all package vignettes run
vignette(package = "loon")
To open the minority
vignette run
vignette('minority', package = "loon")
loon
's plots are anti-aliased on this webpage. You will probably not see anti-aliased plots on your screen because the canvas
widget is only anti-aliased under OS X
. Also, the Tcl
version that is included in R
under OS X
does not have an anti-aliased canvas.libtk-img
package installed (e.g. Img
Tcl
extension): currently only the ps
file format works reliably for image exports (although the font mapping is not correct yet). I recommend for now to make screenshots if you need to put a loon
plot into your report.