This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# all about histograms | |
library(Sleuth3) | |
head(case0102) | |
#check the summary for finding min and max of the subset that you want to work with | |
summary(case0102$Salary[case0102$Sex == "Male"]) | |
# plot the histogram in default setting | |
hist(case0102$Salary[case0102$Sex == "Male"], | |
main = "Histogram of starting salary of Men", | |
xlab = "Salary") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(sp) | |
library(RColorBrewer) | |
crimeW12 <- read.csv(url("http://data.gov.in/access-point-download-count?url=http://data.gov.in/sites/default/files/crdCAW_1.csv"), header = TRUE) | |
load(url("http://biogeo.ucdavis.edu/data/gadm2/R/IND_adm1.RData")) | |
#divide the data set into different crime headers | |
temp <- crimeW12[,c(1,4)] | |
crimeRep1 <- data.frame(State = temp[1:38,1], | |
Rape = temp[1:38,2], Kidnap = temp[39:76,2], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install library "Sleuth3" | |
install.packages("Sleuth3") | |
# load the library | |
library(Sleuth3) | |
#Getting data into R | |
#Reading data from computer or url: | |
chair_data <- read.table(url("http://users.stat.umn.edu/~malli066/3022/runstitch.txt"),header=T) |