On R

    What Is A Good Introduction To R? a good manual is "An Introduction to R", in pdf and html. There are other manuals on the R website.

    What are classes, objects, and slots? A class is a definition of a data structure. For instance, it may be useful to define a class to store the information that is associated with a certain type of model. TIMP defines the class "dat" to store information associated with models. For kinetic model options, TIMP defines the class "kin". For spectral models, TIMP defines the class "spec". An object is an instance of a class. For instance, if the TIMP function initModel is used to initialize a new kinetic model, it will return an object of class "kin". What is stored in an (S4) object "x" can be seen by saying "slotNames(x)". If the object "x" stores an object called "a", you can see what the contents of "a" are by saying "x@a". The class system of R is called "The S4 class system". To read more about this topic see e.g., here or here .


    Why do I get "Error in plot.new : Figure margins too large"? This error means that there is no room on the page for the plots. In TIMP, this error usually triggered by trying to place too many traces or time-resolved spectra on a page. By default, TIMP will attempt to plot all traces/time-resolved spectra. So for example,

    denRes <- fitModel(list(denS4), model1, opt=list(iter=1, linrange = .2, makeps = "MARI", xlabel = "time (ps)", ylabel = "wavelength"))

    will result in trying to plot all of the wavelengths in the dataset denS4. If there are many wavelengths, an error can be avoided by telling fitModel to plot only selected traces. This requires the option selected_traces = c(indices of traces you want), for example, as follows

    denRes<-timDriver(list(denS4), model1, opt=list(iter=1, linrange = .2, makeps = "MARI", notraces = TRUE, selectedtraces = c(1,5,20,32), xlabel = "time (ps)", ylabel = "wavelength"))

    If you want to plot every nth wavelength (i.e., trace) then the seq function is very handy. For instance, you can use it to plot every third wavelength with

    selectedtraces = seq(1, 32, by=3)

    which means to go from wavelength 1 to 32 in steps of 3. To see documentation on seq, see its help page by saying


    in R; also see the help page of "kin.opt" for more on the selectedtraces option.

Windows-specific FAQ

    How do I specify a path to my data file so that TIMP can read it? To specify a path to your data file so that TIMP can read it, you need to escape the front-slashes in the path with another front slash. For example:

    dataIN <- readData("D:\\Documents and Settings\\administrator\\Desktop\\data.ivo")

    If you want to avoid having to specify a long path to your data, you can set the working directory for R by going to File and then "set directory" in the R GUI. For example, if you have the data file "data.ivo" in "mydirectory" you can set the working directory to "mydirectory" and then just say (without the complete path to the data):

    dataIn <- readData("data.ivo")

    How do I keep all my data and output files for TIMP organized? You can organize your data in separate folders. Then before you start using TIMP, under the File menu of the RGui, choose "set directory" and set the working directory to the folder where your data is. This allows you to read in data by specifying only the file name (e.g, readData("data.ivo") as opposed to the full path to the data. It also means that all output files are written to this directory. At the end of your R session you can choose to "save image" - this means that everything you have done will be saved as a file (.RData) in the working directory. If you click on .RData later your session will be opened.