Re: [R] Plotting histogram of RT data

2013-04-02 Thread John Kane
 
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

What is x=readdir supposed to do?

John Kane
Kingston ON Canada


 -Original Message-
 From: circle@gmail.com
 Sent: Sun, 31 Mar 2013 22:12:57 +1100
 To: r-help@r-project.org
 Subject: [R] Plotting histogram of RT data
 
 Hey there,
 
 I'm relatively new to R, and am currently working my way through some
 basic
 tutorials. I have a large data set that I've been able to import into the
 program. I'm using a script in which x=readdir (the directory). I am
 trying
 to create a histogram of the data in the 17th column, which is response
 time data ranging from ~200 to 15000. I have tried to create a histogram
 by
 entering hist(x[,17]). However, the output that I receive has an x-axis
 that is wayyy out with small values like 0e+00 up to 6e+05. All the data
 is
 clustered together in one bar at 0e+00 and has a frequency of 15000 on
 the
 y-axis. What am I doing wrong? How can I change the output so that I can
 assess the shape of the distribution?
 
   [[alternative HTML version deleted]]
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Plotting histogram of RT data

2013-03-31 Thread Jacob Fake
Hey there,

I'm relatively new to R, and am currently working my way through some basic
tutorials. I have a large data set that I've been able to import into the
program. I'm using a script in which x=readdir (the directory). I am trying
to create a histogram of the data in the 17th column, which is response
time data ranging from ~200 to 15000. I have tried to create a histogram by
entering hist(x[,17]). However, the output that I receive has an x-axis
that is wayyy out with small values like 0e+00 up to 6e+05. All the data is
clustered together in one bar at 0e+00 and has a frequency of 15000 on the
y-axis. What am I doing wrong? How can I change the output so that I can
assess the shape of the distribution?

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Plotting histogram of RT data

2013-03-31 Thread Peter Ehlers

On 2013-03-31 04:12, Jacob Fake wrote:

Hey there,

I'm relatively new to R, and am currently working my way through some basic
tutorials. I have a large data set that I've been able to import into the
program. I'm using a script in which x=readdir (the directory). I am trying
to create a histogram of the data in the 17th column, which is response
time data ranging from ~200 to 15000. I have tried to create a histogram by
entering hist(x[,17]). However, the output that I receive has an x-axis
that is wayyy out with small values like 0e+00 up to 6e+05. All the data is
clustered together in one bar at 0e+00 and has a frequency of 15000 on the
y-axis. What am I doing wrong? How can I change the output so that I can
assess the shape of the distribution?


I'm confused: is 'x' a data.frame or a directory? What exactly does
x[, 17] mean here?

If x is a data.frame, then the first thing to check is

 range(x[, 17])

It's also _always_ a good idea to check str(x) before you do anything
further with x.

Peter Ehlers



[[alternative HTML version deleted]]


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.