Kubke Lab:Research/ABR/Notebook/2013/10/15

From OpenWetWare

Jump to: navigation, search
Hearing development in barn owls Main project page
Previous entry      Next entry


General Entries

  • Insert content here...

Personal Entries


Testing if I can put knitr output into oww

Test of knitr for openwetware log

This is the first script I wrote to try to see if I could open and plot the data files

## [1] "C:/Documents and Settings/mkub003.uoa/My Documents/Dropbox/Oris ABR dev data/Sandbox"

write path to working directory. need to write some kind of call function so that we can set the different directory paths from different computers. this is my directory on the work PC:

#setwd(“C:/Documents and Settings/mkub003/My Documents/Dropbox/Oris ABR dev data/Sandbox”)

##These are things I tried

list.files() #get list of files

owl233L0B <- read.table(“Copy233L0B.ABR.txt”) dim(owl233L0B)

[1] 1001 5 class(owl233L0B) [1] “data.frame” names(owl233L0B) [1] “V1” “V2” “V3” “V4” “V5” Really Andy? How f'ing descriptive is this eh? ok, so it seems you have v1-5 (variables), then on row 1: msec; left; right; spont; bin

These are the lines that I wrote to read the files

owl233L0B <- read.table("Copy233L0B.ABR.txt", header = T)  #got it
dim(owl233L0B)  #get 1000 5 PASS
## [1] 1000    5
class(owl233L0B)  #get data.frame PASS
## [1] "data.frame"
names(owl233L0B)  #get [1] 'msec'  'left'  'right' 'spont' 'bin'  PASS
## [1] "msec"  "left"  "right" "spont" "bin"

# fig.width=7, fig.height=6

par(mfrow = c(2, 2))  #puts the 4 graphs in a page
plot(owl233L0B[c(1, 2)])
plot(owl233L0B[c(1, 3)])
plot(owl233L0B[c(1, 4)])
plot(owl233L0B[c(1, 5)])

plot of chunk unnamed-chunk-2

#need to look for parameter to change to line plot


  • Enter content here


  • Enter content here

Personal tools