Kubke Lab:Research/ABR/Notebook/2013/10/28
Hearing development in barn owls | <html><img src="/images/9/94/Report.png" border="0" /></html> Main project page <html><img src="/images/c/c3/Resultset_previous.png" border="0" /></html>Previous entry<html> </html>Next entry<html><img src="/images/5/5c/Resultset_next.png" border="0" /></html> |
General Entries
Personal EntriesFabiana
<html> <head>
<body> <p>#libraries</p> <p>#test setting directory and set to analysis file</p> <pre><code class="r">rootdir <- getwd() basedir <- paste(rootdir, "Dropbox/OrisABR/Sandbox", sep = "/") setwd(basedir) </code></pre> <pre><code>## Error: cannot change working directory </code></pre> <pre><code class="r">getwd() </code></pre> <pre><code>## [1] "/Users/mkub003/Dropbox/OrisABR/Sandbox" </code></pre> <p>#Get info from the text file</p> <pre><code class="r">metadata <- readLines("Copy224l0a.txt") n = length(metadata) print(metadata[1:n]) </code></pre> <pre><code>## [1] "MOUSEABR version 6.00"
</code></pre> <p>#read data file and pass it to a new file so I can modify without loosing the
<pre><code class="r">mydata <- read.table("Copy233L0B.ABR.txt", header = T) head(mydata) #passed test </code></pre> <pre><code>## msec left right spont bin
</code></pre> <pre><code class="r">write.table(mydata, "mydata_new") mydata_new <- read.table("mydata_new", header = T) head(mydata_new) #passed test </code></pre> <pre><code>## msec left right spont bin
</code></pre> <p>#Plot the 4 variables (left, right, spont and bin)</p> <pre><code class="r">par(mfrow = c(2, 2)) #puts the 4 graphs in a page plot(mydata_new[c(1, 2)], type = "l") plot(mydata_new[c(1, 3)], type = "l") plot(mydata_new[c(1, 4)], type = "l") plot(mydata_new[c(1, 5)], type = "l") </code></pre> </html> Andy
Oris
|