Hi,
I need to find the power spectrum of an eeg and display frequency in hz. I
found two functions, spectrum or auspec but they give me frequency from 0.0
- 0.5. How do i get frequency in Hz or KHz?
Also, is it possible to plot two overlapping spectra in order to compare
their peaks etc?
Thanks
Hi David,
Thanks, but I don't quite follow your examples below. The residuals you
calculated are still based on the training data from which your cox model was
generated. I'm interested in the testing data.
Best,
...Tao
- Original Message
From: David Winsemius
it works. I really appreciate the help! :)
--
View this message in context:
http://r.789695.n4.nabble.com/Re-how-to-apply-sample-function-to-each-row-of-a-data-frame-tp3050933p3052098.html
Sent from the R help mailing list archive at Nabble.com.
__
here is my original data frame
a b c A B C
[1,] 1 2 3 4 5 6
[2,] 7 8 9 10 11 12
[3,] 13 14 15 16 17 18
a, b, c are type I variables
A, B, C are type II variables
how can I create a new data frame in which:
1) in each row, there are one random number from type I
Dear List,
I am comparing the squared R values of linear models and its spatial
autoregressive counterparts. (SARerror)
(1. lm (Y~X1)
2. lm (Y~ X1+X2)
3. lm(Y~X1+X2+X3))
The squared R values of linear models are generated by command summary (lm).
Similarly, I tried to produce those of
In addition to David's suggestion, you might want to examine the termplot
function,
?termplot
HTH
-Original Message-
From: r-help-boun...@r-project.org on behalf of David Winsemius
Sent: Sat 11/20/2010 3:54 PM
To: Sonja Klein
Cc: r-help@r-project.org
Subject: Re: [R] How to produce glm
Hi Martin,
Thanks for your advice.
Ran following code on R-2.12.0 32bit as admin
for(lib in .libPaths()) {
+ descs - Sys.glob(file.path(lib, *, DESCRIPTION))
+ sizes - file.info(descs)$size
+ names(sizes) - descs
+ print(sizes[sizes 100])
+ }
named numeric(0)
named numeric(0)
Where are the
You never did show us what your data looks like. You could convert
them to POSIXct, then use 'cut' to split them into the bins and then
'table' to count them.
Try something like this:
timeStamp - as.POSIXct('2010-11-21 00:00') + runif(50, 0, 86400) # day's
worth of time
# bin into 1 hour
Is there a fuction like open(path/to/file), readfile or sth like that that
would run code from R file just like I was it typing myself into R Console
window ?
--
View this message in context:
Have a look at function source(), i.e., type in the R console
?source
I hope it helps.
Best,
Dimitris
On 11/21/2010 1:23 PM, madr wrote:
Is there a fuction like open(path/to/file), readfile or sth like that that
would run code from R file just like I was it typing myself into R Console
By default scatter-plot presents data by using circles, is there a way to
make it 1px dots ?
--
View this message in context:
http://r.789695.n4.nabble.com/display-data-as-1px-dots-in-scatterplot-tp3052343p3052343.html
Sent from the R help mailing list archive at Nabble.com.
Hi, these are pretty basic questions. You might want to pick up an
introductory manual.
Lets assume you have a time stamp that already indicates the hours. Assume
you have 300 observations, each of which falls in one of 24 hours of
observation. You easily get the number of obs in each hour with
The tendency is to use residual-like diagnostics on the entire dataset that
was available for model development. For test data we typically run
predictive accuracy analyses. For example, one of the strongest validations
is to show, in a high-resolution calibration plot, that absolute
On Nov 21, 2010, at 3:42 AM, Shi, Tao wrote:
Hi David,
Thanks, but I don't quite follow your examples below.
I wasn't really sure they did anything useful anyway.
The residuals you
calculated are still based on the training data from which your cox
model was
generated. I'm interested
On Nov 21, 2010, at 7:46 AM, madr wrote:
By default scatter-plot
There is no R function by that name.
presents data by using circles, is there a way to
make it 1px dots ?
It may depend on the actual plotting function, which you have not
mentioned, but as a starter read up on the cex
By any chance are there any alternatives to image(...) and filled.contour(...)
I used Rseek to search for that very topic, but didn't turn over any leads...
At 4:46 AM -0800 11/21/10, madr wrote:
By default scatter-plot presents data by using circles, is there a way to
make it 1px dots ?
--
View this message in context:
http://r.789695.n4.nabble.com/display-data-as-1px-dots-in-scatterplot-tp3052343p3052343.html
Sent from the R help mailing list
I know that by setting alpha to for example col = rgb(0, 0, 0, 0.1) it is
possible to see how many overlapping is in the plot. But disadvantage of it
is that single points are barely visible on the background. So I wonder if
there is possible to make setting that single points would be almost
I have tried quit(), and return() but first exits from whole graphical
interface and second is only for functions. What I need only to exit from
current script and return to the console.
--
View this message in context:
On Nov 21, 2010, at 9:52 AM, madr wrote:
I have tried quit(), and return() but first exits from whole graphical
interface and second is only for functions. What I need only to exit
from
current script and return to the console.
?stop
--
David Winsemius, MD
West Hartford, CT
I try to use stop(), but i get:
Error in eval.with.vis(expr, envir, enclos) :
--
View this message in context:
http://r.789695.n4.nabble.com/beginner-simple-keyword-to-exit-script-tp3052417p3052430.html
Sent from the R help mailing list archive at Nabble.com.
Labels are still present on graph render, their names are x and y that is the
same as I used on the variables to supply data for chart. How to get rid of
them.
--
View this message in context:
stop() throws an error but the side effect is to pop out of whatever
environment you may be in and return to the top-level. I thought that
was what you wanted. If not, then please produce a better problem
description with code as requested in the posting guide.
On Nov 21, 2010, at 10:12
On Nov 21, 2010, at 10:21 AM, madr wrote:
Labels are still present on graph render, their names are x and y
that is the
same as I used on the variables to supply data for chart. How to get
rid of
them.
The term labels as used in functions is different than the graphical
objects
Hello, all--
I am having some fun playing with the graphing in quantmod-- very nice! I am
writing a function to calculate (and hopefully plot) support and resistance
lines, but the usual plot call of abline(h=value) does not seem to work.
Here's my code:
require(quantmod)
AAPL-getYahooData(AAPL)
On Nov 21, 2010, at 10:43 AM, madr wrote:
Is there any way of suppressing that error, like in other programming
languages you can specifically invoke an error or simply exit,
If you are in a function, then return()
like after
user input, exiting then is not always identical with error ,
here's the code
x= c(1,5,7,3,4)
y= c(2,4,5,2,5)
plot(x,y,ylim=c(-20,20),xlim=c(min(x),max(x)),pch='X',col = rgb(0, 0, 0,
0.5), xaxt=NULL,yaxt=NULL, xlab=NULL,ylab=NULL)
and x and y are still visible
--
View this message in context:
Replace the xlab=NULL and ylab=NULL in your example code with xlab= and
ylab= to remove the x and y labels on your axes. If you're also trying
to remove the ticks and tick labels, substitute xaxt=n and yaxt=n into
your code.
x= c(1,5,7,3,4)
y= c(2,4,5,2,5)
On Nov 21, 2010, at 11:02 AM, madr wrote:
here's the code
x= c(1,5,7,3,4)
y= c(2,4,5,2,5)
plot(x,y,ylim=c(-20,20),xlim=c(min(x),max(x)),pch='X',col = rgb(0,
0, 0,
0.5), xaxt=NULL,yaxt=NULL, xlab=NULL,ylab=NULL)
and x and y are still visible
?par for valid xaxt and yaxt values. And
Hello
If i want to resample from the tail of exponential distribution,and the
observations are divided to intervals ,the probability of each interval is
p.what is the suitable command?
Regards
Sulafah
[[alternative HTML version deleted]]
On 2010-11-21 08:02, madr wrote:
here's the code
x= c(1,5,7,3,4)
y= c(2,4,5,2,5)
plot(x,y,ylim=c(-20,20),xlim=c(min(x),max(x)),pch='X',col = rgb(0, 0, 0,
0.5), xaxt=NULL,yaxt=NULL, xlab=NULL,ylab=NULL)
and x and y are still visible
If you just want to remove both axis titles (xlab and
Hi Christian
There is a new version of the RCurl package on the Omegahat repository
and that handles this case.
The issue was running the finalizer to garbage
collect the curl handle, and it was correctly not being released as
the dynCurlReader() update function was precious and had a reference
Date: Sun, 21 Nov 2010 00:18:24 -0800
From: master.rs...@yahoo.com
To: r-help@r-project.org
Subject: [R] power spectrum of eeg
Hi,
I need to find the power spectrum of an eeg and display frequency in hz. I
found two functions, spectrum or auspec but they give me frequency from 0.0
-
On 21.11.2010 01:30, Kjetil Halvorsen wrote:
see below.
2010/11/20 Uwe Liggeslig...@statistik.tu-dortmund.de:
On 19.11.2010 21:43, Kjetil Halvorsen wrote:
This is very strange. (Debian squeeze, R 2.12.0 compiled from source)
I did some moderately large computation (including svd of a
OK, trying it on a 8Gb Windows machine with R-2.12.0 64-bit it runs
within less than 2 minutes in 5Gb of RAM.
That means your machine is probably swapping heavily and is therefore
extremely slow.
Nevertheless, this seems to be unrelated with summaryRprof(). The
anacor() call is roughly
x= c(1,5,7,-3,4)
y= c(2,4,-5,2,5)
plot(x,y,ylim=c(-20,20),xlim=c(min(x),max(x)),pch='X',col = rgb(0, 0, 0,
0.5),yaxt=n, ann=FALSE)
and this code produces:
http://i53.tinypic.com/ffd7d3.png
Where I marked in red areas that I want to get rid of and use as much real
screen estate as I can.
--
Is there any way of suppressing that error, like in other programming
languages you can specifically invoke an error or simply exit, like after
user input, exiting then is not always identical with error , there are
cases when it is intended behavior. I thought R makes that distinction.
--
View
On Nov 21, 2010, at 11:49 AM, madr wrote:
x= c(1,5,7,-3,4)
y= c(2,4,-5,2,5)
plot(x,y,ylim=c(-20,20),xlim=c(min(x),max(x)),pch='X',col = rgb(0,
0, 0,
0.5),yaxt=n, ann=FALSE)
Rather than filling up r-help with incremental beginner questions you
need to either:
--- read more
Hi:
On Sun, Nov 21, 2010 at 5:55 AM, Alaios ala...@yahoo.com wrote:
Sorry it was a typo:
my code looks like:
plot_shad_CR-function(x,y,agentid,CRagent,f){
library(ggplot2)
plotdata-melt(f)
names(plotdata)-c('x','y','z')
agent-CRagent[[agentid]] # To make following expression
On Sun, Nov 21, 2010 at 9:52 AM, madr madra...@interia.pl wrote:
I have tried quit(), and return() but first exits from whole graphical
interface and second is only for functions. What I need only to exit from
current script and return to the console.
1. use my.source() below instead of
Better is probably to return() from a function, i.e. define a function
in your script and call that at the end of your function, e.g.
- - - -
main - function() {
# bla
# bla
if (something) {
return();
}
# otherwise
# bla
}
main();
- - - -
Otherwise, here is a hack:
On 11/21/2010 03:12 AM, Stephen Liu wrote:
Hi Martin,
Thanks for your advice.
Ran following code on R-2.12.0 32bit as admin
for(lib in .libPaths()) {
+ descs - Sys.glob(file.path(lib, *, DESCRIPTION))
+ sizes - file.info(descs)$size
+ names(sizes) - descs
+ print(sizes[sizes 100])
Alternatively give ggplot2 package a try:
x= c(1,5,7,-3,4)
y= c(2,4,-5,2,5)
xx - data.frame(x,y)
library(ggplot2)
qplot(x,y, data=xx)
--- On Sun, 11/21/10, madr madra...@interia.pl wrote:
From: madr madra...@interia.pl
Subject: [R] how to get rid of unused space on all 4 borders in
On Sun, Nov 21, 2010 at 10:56:14AM -0500, David Winsemius wrote:
On Nov 21, 2010, at 10:43 AM, madr wrote:
Is there any way of suppressing that error, like in other programming
languages you can specifically invoke an error or simply exit,
If you are in a function, then return()
like
Sorry it was a typo:
my code looks like:
plot_shad_CR-function(x,y,agentid,CRagent,f){
library(ggplot2)
plotdata-melt(f)
names(plotdata)-c('x','y','z')
agent-CRagent[[agentid]] # To make following expression shorter
ggplot((data.frame(x=CRX,y=CRY,sr=agent$sr)))+
Thanks to all for the great insightful answers!
Sincerely,
Erin
On Sat, Nov 20, 2010 at 10:22 PM, bill.venab...@csiro.au wrote:
The conventional view used to be that S is the language and that R and S-PLUS
are implementations of it. R is usually described as 'a programming
environment
I have looked into par documentation, and only setting for size of the plot
area was pin. But this setting sets the area as inflexible, that is no
matter how I make the window small or big it stays the same. Default value
has advantage that however it uses plot area that is always smaller than
-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of Henrik Bengtsson
Sent: Sunday, November 21, 2010 8:17 AM
To: David Winsemius
Cc: r-help; madr
Subject: Re: [R] [beginner] simple keyword to exit script ?
Better is probably
-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of Shant Ch
Sent: Saturday, November 20, 2010 6:34 PM
To: David Winsemius
Cc: r-help@r-project.org
Subject: Re: [R] density at particular values
David, I did look at ?density
On Nov 21, 2010, at 1:31 PM, madr wrote:
I have looked into par documentation, and only setting for size of
the plot
area was pin. But this setting sets the area as inflexible, that is no
matter how I make the window small or big it stays the same. Default
value
has advantage that
Hello,
Searching this forum has enabled me to get pretty far in what I'm trying to
do. However, there is one more manipulation I would like to make and I
haven't found a solution. Using the data and code below, I generate the
plot produced by the last command. If possible I would like to
Gong, thanks!! but your syntax did work out as I would expect. here following
are the reasons:
each row from my original data frame represents data from one subject. when
the one type I number and the
two type II numbers are drawn from the original data frame, both type I
number and type II
On Nov 21, 2010, at 2:43 PM, madr wrote:
finally I found what I wanted, John Kane send it, and I don't know
why it
hasn't been posted automatically to the list so I post it by myself:
solution is this: par(mai=c(.5,.5,.5,.5))
These four numbers are the margins, so setting it to 0,0,0,0
To R-help list:
I would like to use lm() and lmRob() to estimate the parameters of a
fixed-effects model that includes nested factors with unequal numbers
of levels, in some cases without also including the nesting factor in
the model.
When I specify options(contrasts=c(contr.sum,contr.poly)),
Hi,
I'm joining in with a question -- is it possible to vary the color of
the lines along z? The 'colors' argument doesn't seem to allow a
vector in this situation.
Thanks,
baptiste
On 21 November 2010 21:02, Carl Witthoft c...@witthoft.com wrote:
Thanks, Dennis. Here's an enhanced
Hello- I am trying to calculate the between-group covariance matrix for a
set of data for eventual Canonical Discrim Analysis. I can obtain the total
covariance matrix and individual group covar matrix, but I am failing
miserably at getting the between-group covar. The data set is composed of 9
On Nov 21, 2010, at 3:42 PM, baptiste auguie wrote:
Hi,
I'm joining in with a question -- is it possible to vary the color of
the lines along z? The 'colors' argument doesn't seem to allow a
vector in this situation.
This section of the code (which appears fairly close to the beginning,
On Nov 21, 2010, at 10:50 AM, David L. Van Brunt, Ph.D. wrote:
Hello, all--
I am having some fun playing with the graphing in quantmod-- very
nice! I am
writing a function to calculate (and hopefully plot) support and
resistance
lines, but the usual plot call of abline(h=value) does not
On 21.11.2010 20:30, emorway wrote:
Hello,
Searching this forum has enabled me to get pretty far in what I'm trying to
do. However, there is one more manipulation I would like to make and I
haven't found a solution. Using the data and code below, I generate the
plot produced by the last
Thanks, Dennis. Here's an enhanced version:
z - seq(-10, 10, 0.1)
zm-cbind(z,z,z,z,z,z,z,z,z,z)
ym-matrix(nr=201,nc=10)
for (i in seq(1,201)) {
for (j in seq(1,10)) ym[i,j]-j/10*sin(zm[i,1])}
xm-matrix(nr=201,nc=10)
for (i in seq(1,201)) {
for (j in seq(1,10))
On 21-Nov-10 19:11:20, William Dunlap wrote:
-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of Shant Ch
Sent: Saturday, November 20, 2010 6:34 PM
To: David Winsemius
Cc: r-help@r-project.org
Subject: Re: [R] density at
# 89 px / 105 px - wasted space
png(d:/test.png,width=1369,height=1129,units=px)
par(bg='black',fg='gray',col='gray',col.axis='gray',col.lab='gray',col.main='gray',col.sub='gray')
plot(x,y,ylim=c(-20,20),xlim=c(min(x),max(x)),pch='.',col = rgb(1,1,1,
0.5),yaxt=n, ann=FALSE)
dev.off()
so only
As others have noted, you can use predict() to get the fitted values
and then plot them 'manually' using basic plotting functions in R.
However, you will probably find it easier to use the effects package,
which is designed for exactly this task. e.g.,
install.packages(effects) # if necessary
here is what i mean:
before: http://i51.tinypic.com/117xv6v.png
after : http://i51.tinypic.com/sv2xed.png
--
View this message in context:
http://r.789695.n4.nabble.com/is-it-possible-to-put-tick-labels-inside-plotting-area-tp3052777p3052777.html
Sent from the R help mailing list archive at
On 11/07/2010 08:06 PM, David Winsemius wrote:
On Nov 7, 2010, at 12:25 PM, David Winsemius wrote:
On Nov 7, 2010, at 11:40 AM, Carl Witthoft wrote:
Hi all,
Just thought I'd post this (maybe) helpful tool I wrote. For people
like me who are bad at keeping a clean environment, it's a
I found it. It was hard to find because no one asked about it , the proper
question was about distance from the axis which can be negative. So the
proper answer is :
par( mgp = c(0, -1.4, 0) ) - only the center value is controlling feature
in question.
--
View this message in context:
finally I found what I wanted, John Kane send it, and I don't know why it
hasn't been posted automatically to the list so I post it by myself:
solution is this: par(mai=c(.5,.5,.5,.5))
These four numbers are the margins, so setting it to 0,0,0,0 will render
only plot area with 1px for box on
On 2010-11-21 13:18, madr wrote:
I found it. It was hard to find because no one asked about it , the proper
question was about distance from the axis which can be negative. So the
proper answer is :
par( mgp = c(0, -1.4, 0) ) - only the center value is controlling feature
in question.
If
On 11/21/10 11:24, Ahmed Attia wrote:
-- Forwarded message --
From: Ahmed Attia ahmedati...@gmail.com
Date: Sun, Nov 21, 2010 at 11:06 AM
Subject: R help
To: r-help@r-project.org
Dear All,
I'm a beginner user in R and I would like to make a quadratic plus plateau
and
Dear Ahmed,
Can you give a more specific example of what you want to do? Do you
mean you want to test specific contrasts for a categorical variable?
If you are new to R, you will find it helpful to read the Introduction to R
http://cran.r-project.org/doc/manuals/R-intro.html
I also recommend
Hi Martin,
Thanks for your advice.
This is my first time hunting for cause of error on R.
Steps performed as follows;
Sys.glob(file.path(.libPaths()[1], *, DESCRIPTION))
[1] C:\\Users\\satimis\\Documents/R/win-library/2.12/Ecdat/DESCRIPTION
[2]
Date: Sun, 21 Nov 2010 16:01:44 -0800
From: jwiley.ps...@gmail.com
To: ahmedati...@gmail.com
CC: r-help@r-project.org
Subject: Re: [R] Fwd: Fwd: R help
Dear Ahmed,
Can you give a more specific example of what you want to do? Do you
mean you
Hello, I am putting a legend with lines in a line plot and I would like to
make the lines in the legend shorter. Does anybody knows how to do this?
Thank you
Felipe Parra
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing
Dear R users,
If you could please provide an example with the data set for the linear plus
plateau model in R. I've 5 N rates and I need to make this model between N
rates and grain Yield.
Thanks so much
Ahmed
--
Ahmed M. Attia
Assistant Lecturer
El-Khattara farm Station
Agronomy Dept.,
On 11/21/2010 05:21 PM, Stephen Liu wrote:
Hi Martin,
Thanks for your advice.
This is my first time hunting for cause of error on R.
Hi Stephen --
read the help pages ?browser, ?recover *before* trying to use the
commands ...
?browser
?recover
Steps performed as follows;
Dear All,
I'm a beginner user in R and I would like to make a quadratic and
plateau model in R. Can you help please with an example?
Thanks so much
--
Ahmed M. Attia
Assistant Lecturer
El-Khattara farm Station
Agronomy Dept.,
Zgazig Univ., Egypt
Visiting Scientist
Haskell Agricultural
Hey, PS,
I revised your syntax and used it to another one of my data frames (df).
here is the data frame:
a b c A B C
[1,] 1 2 3 4 5 6
[2,] 7 8 9 10 11 12
[3,] 13 14 15 16 17 18
a, b, c are type I variables
A, B, C are type II variables
each row represent the
Can someone please fix this snippet? (i.e. append to the dataframe a column
containing truncated time value)?
df = structure(list(t = structure(c(1033963406.044, 1033974144.847,
1033988418.836), class = c(POSIXt, POSIXct))), .Names = t, row.names =
c(NA,
3L), class = data.frame)
# Try 1
On 21/11/10 21:18, Az Ha wrote:
Hi,
I need to find the power spectrum of an eeg and display frequency in hz. I
found two functions, spectrum or auspec but they give me frequency from 0.0
- 0.5. How do i get frequency in Hz or KHz?
Also, is it possible to plot two overlapping spectra in order to
On Nov 21, 2010, at 3:52 PM, Dimitri Shvorob wrote:
Can someone please fix this snippet? (i.e. append to the dataframe a
column
containing truncated time value)?
df = structure(list(t = structure(c(1033963406.044, 1033974144.847,
1033988418.836), class = c(POSIXt, POSIXct))), .Names = t,
Hi,
I would like to overlap the cdf curve for observed and generated data Here is
my code:
plot(cdf,main =CDF of the sum for winter
season-Hume,cex.axis=1.2,xlab=Rainfall (mm),
xaxs=i,yaxs=i,col=c(black,red), lty=c(1,1),ylab=Cumulative
probability, xlim=c(0,800),lwd=1)
lines(ecdf(datobs))
Ah, this looks like Australian data :)
One simple way would be to use the lowess function and fiddle with the
f parameter (like bandwidth).
Michael
On 22 November 2010 14:18, Roslina Zakaria zrosl...@yahoo.com wrote:
Hi,
I would like to overlap the cdf curve for observed and generated data
Hi Ahmed,
Does 'quadratic plateau' model refer to a chage-point or bent-cable
regression with quadratic on one side and an asymptote on the other ?
If so, you might like to look at the bentcableAR package. There is a
background article here:
Sorry, chage-point should be change-point
On 22 November 2010 14:44, Michael Bedward michael.bedw...@gmail.com wrote:
Hi Ahmed,
Does 'quadratic plateau' model refer to a chage-point or bent-cable
regression with quadratic on one side and an asymptote on the other ?
If so, you might like to
Hi Martin,
Sorry I can't fix the update problem. Reading ?browser and ?recover didn't
help
me out.
Finally I uninstalled R, 32/64 bit and RExcel and made a fresh installation of
them.
Remark:
I need to remove all folders with connection to them. Otherwise after
installing R, RExcel,
In order to gain a bit more control over the fill contour functionality I'm
trying to use the Internal filledcontour function. I wasn't able any
documentation on this function and only one reference to it.
I believe the code shown below is close because all the dimensions seem to be
2010/11/20 Uwe Ligges lig...@statistik.tu-dortmund.de:
On 18.11.2010 11:30, skan wrote:
Hello everybody.
My question arised from the output of lattice's histogram. But might be
extended to any other object that could be printed.
I think I've understood your answers, print calls the plot
Hi Ahmed,
Please reply via the list - you'll get better answers because most
people there know more than me :)
Here is a toy example that is similar to the example graph you sent me...
# generate data: linear up to a change point, then plateau with constant std dev
x - 20:70
y -
Hi!
I have a matrix called M with dimension (586,100,100). I would like to split
and save this into 586 matrices with dimension 100 by 100.
I have tried the following for loops but couldn't get it work..
l-dim(M)[1]
for (i in (1:l)){
save(M[i,,],file = M_[i].img)
}
Can somebody help me with
Hi,
On Sun, Nov 21, 2010 at 9:27 PM, Hana Lee hana...@email.unc.edu wrote:
Hi!
I have a matrix called M with dimension (586,100,100).
First of all, In R it is only an object with *two* dimensions that is
called matrix. Anything with two or more dimensions is called an
array. Example:
x -
Hi Hana,
Use the paste function to create your file names.
for ( i in 1:dim(M)[1] ) save( M[i,,], file=paste(M_, i, .img, sep=) )
Alternatively, use the sprintf function to get names with leading
zeroes for easier sorting of files:
for (i in 1:dim(M)[1] ) save( M[i,,], file=sprintf(M_%03d.img,
Sorry, I did a mistake corrected below.
On Sun, Nov 21, 2010 at 9:50 PM, hb h...@biostat.ucsf.edu wrote:
Hi,
On Sun, Nov 21, 2010 at 9:27 PM, Hana Lee hana...@email.unc.edu wrote:
Hi!
I have a matrix called M with dimension (586,100,100).
First of all, In R it is only an object with *two*
David Scott-6 wrote:
On 21/11/10 21:18, Az Ha wrote:
Hi,
I need to find the power spectrum of an eeg and display frequency in hz.
I
found two functions, spectrum or auspec but they give me frequency from
0.0
- 0.5. How do i get frequency in Hz or KHz?
Also, is it possible to plot two
On Nov 22, 2010, at 12:27 AM, Hana Lee wrote:
Hi!
I have a matrix called M with dimension (586,100,100).
In R you have an array (not a matrix) wehn the number of dimensions is
3.
I would like to split
and save this into 586 matrices with dimension 100 by 100.
I have tried the
Hi r-users,
I would like my axes to intersect at (0,0). I tried xaxs=i,yaxs=i but it
does not change anything. I hope anybody can help me with this problem. Here
is my code.
hist(datobs, prob=TRUE, main =PDF of the sum of two
stations,col=yellowgreen, cex.axis=1.2,
xlab=Rainfall (mm),
Hello everyone,
I am trying to built an xts object and i have run into some problems on the
data handling. I would really appreciate if someone could help me with the
following:
1) I have a OHLC dataset with Time and date in different columns. How could
i combine date and time in one column in
Thank to everybody that helped.
I have a working bit of code :-)
On Nov 20, 2010, at 3:25 PM, David Potts wrote:
Hi List
I am trying to call the R library function rosavent from the climatol
package via the plr interface package to the postgres database.
My code is a follows
create
97 matches
Mail list logo