Commits

dan mackinlay committed 93b764d

cs-36-402 homework 1

Comments (0)

Files changed (4)

cs-36-402/homework 1/.Rapp.history

+demo()
+demo(recursion)
+demo(scoping)
+ls()
+logistic.map = function(x) {4*x*(1-x)}
+low.x = runif(75,0, 0.7)
+hi.x =  runif(25, 0.8, 1.0)
+main.y =  logistic.map(c(low.x, hi.x)) + rnorm(100, 0, 0.05)
+outlier.x = runif(10, 0.85, 0.9)
+outlier.y = runif(10, 0.85, 0.9)
+all.x=c(low.x, hi.x, outlier.x)
+all.y=c(main.y, outlier.y)
+plot(all.x,all.y,xlab="x", ylab="y")
+rug(all.x,side=1,col="grey")
+rug(all.y,side=2,col="grey")
+abline(h=mean(all.y), lty=3)
+fit.all = lm(all.y~all.x)
+abline(fit.all)
+library(knnflex)
+library(boot)
+help(boot)
+help(entropy)
+??entropy
+library(entropy)
+help(entropy)
+install.packages("entropy")
+help(entropy)
+library(entropy)
+help(entropy)
+cwd("src/me/cs-36-402/homework 1/")
+help(entropy)
+setwd("src/me/cs-36-402/homework 1/")
+cadata=table.read('cadata.dat', header=TRUE)
+cadata=read.table('cadata.dat', header=TRUE)
+save()
+save('.Rdata')
+save(file='.Rdata')
+sink('hist.R' split=TRUE)
+sink('hist.R', split=TRUE)
+library(rgl)
+rgl.surface(cadata$Latitude, cadata$Longitude, cadata$MedianHouseValue)
+?rgl.points
+?unique
+?length
+length(cadata$MedianHouseValue)
+length(cadata$Latitude)
+length(unique(cadata$Latitude))
+length(unique(cadata$Longitude))
+862*844
+?rgl
+rgl.open()
+rgl.spheres(cadata$Latitude, cadata$Longitude, cadata$MedianHouseValue)
+install.packages('ggplot2', dependencies=TRUE)
+?lattice
+??lattice
+install.packages('grid')
+library(lattice)
+xyplot(cadata$Latitude, cadata$Longitude, cadata$MedianHouseValue)
+xyplot(cadata$Latitude, cadata$Longitude, cadata$MedianHouseValue)?Lattice
+?La
+?Lattice

cs-36-402/homework 1/.Rhistory

+setwd("~/src/me/cs-36-402/homework 1")
+help(shell)
+help(sh)
+help(process)
+??process
+??shell
+read.table(file="cadata.dat", header=TRUE)
+cadata=read.table(file="cadata.dat", header=TRUE)
+names(cadata)
+fix(logistic.map)
+install.packages("rgl")
+install.packages("rgl")
+packages
+package
+??package
+??utils::install.packages
+?utils::install.packages
+install packages('rgl')
+install.package('rgl')
+utils::install.packages('rgl')

cs-36-402/homework 1/cadata.dat.gz

Binary file added.

cs-36-402/homework 1/hist.R

Empty file added.