Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Rprofile.site example

# THE SCRTIPT BELOW IT IS NOT NECESSARY ANYMORE
# FROM VERSION >= 3.1.0.8 of TINN-R PROJECT

# Things you might want to change

# options(papersize="a4")
# options(editor="notepad")
# options(pager="internal")

# set the default help type
# options(help_type="text")
  options(help_type="html")

# set a site library
# .Library.site <- file.path(chartr("\\", "/", R.home()), "site-library")

# set a CRAN mirror
# local({r <- getOption("repos")
#       r["CRAN"] <- "http://my.local.cran"
#       options(repos=r)})

# Give a fortune cookie, but only to interactive sessions
# (This would need the fortunes package to be installed.)
#  if (interactive()) 
#    fortunes::fortune()

##===============================================================
## Tinn-R: necessary packages and functions
## Tinn-R: >= 2.4.0.1 with TinnR package >= 1.0.3
##===============================================================
## Set the URL of the preferred repository, below some examples:
#options(repos='http://cran.at.r-project.org/')      # Austria/Wien
#options(repos='http://cran-r.c3sl.ufpr.br/')       # Brazil/PR
#options(repos='http://cran.fiocruz.br/')           # Brazil/RJ
#options(repos='http://www.vps.fmvz.usp.br/CRAN/')  # Brazil/SP
options(repos='http://brieger.esalq.usp.br/CRAN/') # Brazil/SP

library(utils)

## Check necessary packages
necessary <- c('TinnR',
               'svSocket',
               'formatR')

installed <- necessary %in% installed.packages()[, 'Package']
if (length(necessary[!installed]) >=1)
  install.packages(necessary[!installed])

## Load packages
library(TinnR)
library(svSocket)

## Uncoment the two lines below if you want Tinn-R to always start R at start-up
## (Observation: check the path of Tinn-R.exe)
#options(IDE='C:/Tinn-R/bin/Tinn-R.exe')
#trStartIDE()

## Option
options(use.DDE=T)

## Start DDE
trDDEInstall()

## Short paths
.trPaths <- paste(paste(Sys.getenv('APPDATA'),
                        '\\Tinn-R\\tmp\\',
                        sep=''),
                  c('',
                    'search.txt',
                    'objects.txt',
                    'file.r',
                    'selection.r',
                    'block.r',
                    'lines.r',
                    'reformat-input.r',
                    'reformat-output.r'),
                  sep='')
Posted by jcfaria 2013-01-30