R is open-source, and available for all major platforms. See this documentation for detailed instructions, or simply download and install it.
Optionally, but highly recommended, you should also install a good script editor, such as Rstudio, or emacs (with ESS mode).
The easiest way to install packages is from within R itself; it will download the files from the central repository and install the packages in a local library.
install.packages("cda", dependencies = TRUE)
required <- c("Rcpp", # R/C++ interface "RcppArmadillo", # Rcpp interface with the Armadillo linear algebra C++ library "statmod", # provides Gauss-Legendre quadrature points for orientation-averaging "randtoolbox", # helping functions for Quasi-Monte Carlo integration "reshape2", # data reshaping "plyr", # convenience split-and-apply functions "dielectric", # permittivity of common materials ) suggested <- c( "rgl", # R interface to OpenGL for 3D visualisation "ggplot2", # plotting and data reshaping "knitr", # literate programming (run code embedded in the wiki files) "testthat", # testing code correctness "gridExtra" # misc. plotting facilities ) dependencies <- c(required, suggested) install.packages(dependencies) install.packages("cda")
The code under development is available on github; the most recent package can be installed from R,
library(devtools) install_github("cda", "baptiste")
On Windows, some tools will be required to compile the C++ code; for convenience here is a link to the currrent Windows binary.
library(cda) ?"cda-package" # access to help
## Introductory document vignette("CD-theory", package = "cda") ## A few examples demo(package = "cda") # then run # demo(dimer_cd) # etc.
Simulating extinction and optical activity from a dimer of gold nanorods
clusters generate 3D views of some predefined cluster shapes using RGL rendering or povray
dimer_linear extinction spectrum of a dimer of gold nanorods
dimer_cd circular dichroism for a chiral dimer of gold nanorods
helix_cd circular dichroism for a helix of gold nanoparticles
diffractive_chain extinction spectrum of a linear chain of gold nanorods
diffractive_array extinction spectrum of a square array of gold nanorods
lattice_sum lattice sum for a 2D square array of dipoles
multiple_incidence dispersion plot with varying angles of incidence
averaging_method compares the performance of GL quadrature, QMC, and basic grid
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.