NexusFi: Find Your Edge


Home Menu

 



R/RStudio Quick Start Guide

Welcome to R and RStudio!

R is an open source programming language and software environment for statistical computing and graphics.
The R language is widely used among statisticians for developing statistical software and data analysis.

RStudio is a free and open source integrated development environment for R.

Combining the two provides one of the most powerful statistical data anaylsis tools available with an easy to
use interface. I hope you find this Quick Start Guide useful and an interest in R.

Installation
  1. Download and Install R.
  2. Download and Install RStudio.


Help Command Example
  • Get help on the Get Working Directory command:
     
    Code
    help(getwd)


Import Your Data
  1. Export or save your data from your application in csv format, a comma separated values text file file format.
  2. Import and prepare your data:
 
Code
wd <- getwd()
setwd("C:/Users/Firstname/Desktop")
mydata <- read.csv("datafile.csv")
attach(mydata)

Informational Commands
  •  
    Code
    names(mydata)
    [1] "Instrument"
    [2] "Performance"
    [3] "Parameters"
    [4] "From"
    [5] "To"
    [6] "Total.Net.Profit"
    .
    .
  •  
    Code
    summary(mydata)
    .
    .
    Total.Net.Profit Gross.Profit Gross.Loss
    Min. :-1525.00 Min. : 0.0 Min. :-1525.0
    1st Qu.: -72.50 1st Qu.: 0.0 1st Qu.: -115.6
    Median : 0.00 Median : 0.0 Median : 0.0
    Mean : 64.77 Mean : 168.6 Mean : -103.9
    3rd Qu.: 97.50 3rd Qu.: 130.6 3rd Qu.: 0.0
    Max. : 3075.00 Max. :3075.0 Max. : 0.0
    .
    .


Graphic Commands (See Attachments Below)
  • hist(Total.Net.Profit, breaks=100)
  • plot(From, Total.Net.Profit)


Calculation Commands
  • ...

Attached Thumbnails
Click image for larger version

Name:	HistExample.png
Views:	280
Size:	6.6 KB
ID:	93319   Click image for larger version

Name:	PlotExample.png
Views:	305
Size:	28.6 KB
ID:	93320  


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top