[R] question about changing color scale in plot.fmri

2010-09-16 Thread Dana TUDORASCU
  Hello everybody,
 I am using plot.fmri function to plot some stats on a functional image, but
for some reasons the only collor I get on the image is gray.
 Here is the function I am
using:plot.fmridata(t1,type=slice,col.o=heat.colors(256))
 It is the first time I am using this package, so I might be doing something
completely wrong.
 Any advice would be great !
 Dana

[[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.


[R] question about reshape

2010-01-28 Thread Dana TUDORASCU
 Hello everyone,
 I have a bit of a problem with reshape function in R.
 I have simulated some normal data, which I have saved in 4 vectors.
 y.1,y.2,y.3,y.4 which I combined a dataset:
datasetcbind(y1,y2,y3,y4). I have also generated some subject id number,
and denoted that by subject.
 So, my dataset looks like this:
subject   y.1y.2   y.3   y.4
 [1,]   1 20.302707 16.9643106 30.291031  7.118748
 [2,]   2  9.942679  9.3674844  7.578465 16.494813
..etc, I have 20 subjects.
 I want to transform this data into long form dataset, but it does not work.
 I am using reshape command, and should be very straight forward...
 Here is what I use:
 long-reshape(dataset, idvar=subject, v.names=response,
varying=list(2:5), direction=long)

Here is what I get:
Error in d[, timevar] - times[1L] : subscript out of bounds

Now, do I get that error because the first column shows me the row number?
 I have been using R for a while, but not a lot for data manipulations.
 Any help would be great! Thank you in advance.
 Dana

[[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] question about reshape

2010-01-28 Thread Dana TUDORASCU
Thank you very much everybody. That worked.
 Dana


On Thu, Jan 28, 2010 at 12:23 PM, Henrique Dallazuanna www...@gmail.comwrote:

 Try this:

 ong-reshape(as.data.frame(dataset), idvar=subject,
 v.names=response, varying=list(2:5), direction=long)
 or
 dataset - cbind.data.frame(y1, y2, y3, y4)

 On Thu, Jan 28, 2010 at 3:07 PM, Dana TUDORASCU dana...@gmail.com wrote:
   Hello everyone,
   I have a bit of a problem with reshape function in R.
   I have simulated some normal data, which I have saved in 4 vectors.
   y.1,y.2,y.3,y.4 which I combined a dataset:
  datasetcbind(y1,y2,y3,y4). I have also generated some subject id number,
  and denoted that by subject.
   So, my dataset looks like this:
 subject   y.1y.2   y.3   y.4
   [1,]   1 20.302707 16.9643106 30.291031  7.118748
   [2,]   2  9.942679  9.3674844  7.578465 16.494813
  ..etc, I have 20 subjects.
   I want to transform this data into long form dataset, but it does not
 work.
   I am using reshape command, and should be very straight forward...
   Here is what I use:
   long-reshape(dataset, idvar=subject, v.names=response,
  varying=list(2:5), direction=long)
 
  Here is what I get:
  Error in d[, timevar] - times[1L] : subscript out of bounds
 
  Now, do I get that error because the first column shows me the row
 number?
   I have been using R for a while, but not a lot for data manipulations.
   Any help would be great! Thank you in advance.
   Dana
 
 [[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.
 



 --
 Henrique Dallazuanna
 Curitiba-Paraná-Brasil
 25° 25' 40 S 49° 16' 22 O




--

[[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.