# Holcombe:ProgrammingInR

(Difference between revisions)
 Revision as of 02:49, 29 April 2009 (view source)← Previous diff Revision as of 02:08, 20 August 2009 (view source) (→Setting up a proxy in R on a Mac)Next diff → Line 38: Line 38: Then restart R. Then restart R. This information (and more) can be found on [http://www.kenbenoit.net/?p=261 Ken Benoit's webpage] This information (and more) can be found on [http://www.kenbenoit.net/?p=261 Ken Benoit's webpage] + + For Sydney Uni, use: + + Sys.setenv(http_proxy=”http://www-cache.usyd.edu.au:8080″) +

## Revision as of 02:08, 20 August 2009

### Members

Alex Holcombe
Sarah McIntyre
Fahed Jbarah
• Shih-Yu Lo
• Patrick Goodbourn
Lizzy Nguyen
Alumni

### Other

R is a programming language for statistics. However it may have menu-driven versions maybe available R commander we haven't tried that and another one is pmg GTK maybe here

R_Statistics introduces you to R

R reference cheatsheet, also a file here Media:Matlab-python-xref.pdf‎ that gives equivalent code for doing array operations in MATLAB, Python, and R plot parameters

In the lab we have the book Using R for Introductory Statistics.

There is a wiki with some good tips here.

Examining your data matrix or object, let's say it's called datos

```head(datos)
str(datos)
```

Don't use the function attach. It seems to leave lots of data in the 'environment' that can cause problems later. Also it makes the code harder to understand.

### doing ANOVAs etc

I think I had too many error terms reducing error terms

## Dealing with circular data

von Mises vs. wrapped Gaussian,

see Swindale, N. V. (1998). Orientation tuning curves: empirical description and estimation of parameters. Biol Cybern, 78(1), 45-56.

## Setting up a proxy in R on a Mac

The easiest way to set up a proxy is simply to create a file called ".Rprofile" in your user directory (~ or Users/username/) with the line: ``` ```

``` Sys.setenv(http_proxy=”http://username:password@tcdproxy.tcd.ie:8080″) ```

Then restart R. This information (and more) can be found on Ken Benoit's webpage

For Sydney Uni, use: ``` ```

``` Sys.setenv(http_proxy=”http://www-cache.usyd.edu.au:8080″) ```