Presentation is loading. Please wait.

Presentation is loading. Please wait.

Setting up R Project Link to download R: Link to download R console:

Similar presentations


Presentation on theme: "Setting up R Project Link to download R: Link to download R console:"— Presentation transcript:

1 Setting up R Project Link to download R: Link to download R console: Useful links for R:

2 csv. file Example of csv. file link:

3 Setting up the directory of opening the file

4 setwd(dir) setwd (Set Working Directory)
returns the current directory before the change, invisibly and with the same conventions as getwd. It will give an error if it does not exist. Variables can then be accessed by their name only.

5 How to find the directory of file

6 Accessing the csv. file

7 Attach the file

8 Access the first row of the values in csv. file

9 names(file object name)
Returns the first row of values

10 Showing the overall point above 2 colleges

11 boxplot(varA~varB) Produce box-and-whisker plot(s) of the given (grouped) values. varA : The variable that represent the number ~ : the connection to varA and varB varB : The object that compares

12 Showing the elements in “Division” column

13 levels(var) levels provides access to the levels attribute of a variable. The first form returns the value of the levels of its argument and the second sets the attribute.

14 T-test of overall and college

15 t.test(varA~varB) Performs one and two sample t-tests on vectors of data. varA: The value that is using for calculation varB: The binary variable that defines the populations being compared

16 Left-tailed t-test

17 Showing the table of gender in Division

18 myTable <-table(varA, varB):
table: table uses the cross-classifying factors to build a contingency table of the counts at each combination of factor levels. <- : assignment operator myTable: the variable that contains all the collection of

19 Showing the histograms of easiness

20 hist(dataName) hist: The generic function hist computes a histogram of the given data values. dataName: the value that is calculated for the histogram.


Download ppt "Setting up R Project Link to download R: Link to download R console:"

Similar presentations


Ads by Google