thx jorge, I was playing around with ifelse to solve the problem, but was
unaware
of the all(is.na(x)). RTFM I guess.
On Sat, Apr 17, 2010 at 10:31 PM, Jorge Ivan Velez wrote:
> Hi Steven,
>
> Try this:
>
> R> apply(m,1, function(x) ifelse(all(is.na(x)), NA, max(x, na.rm = TRUE)))
> [1] NA 8 9
Hi Steven,
Try this:
R> apply(m,1, function(x) ifelse(all(is.na(x)), NA, max(x, na.rm = TRUE)))
[1] NA 8 9
See ?ifelse, ?all and ?max for more information.
HTH,
Jorge
On Sun, Apr 18, 2010 at 12:16 AM, steven mosher <> wrote:
> Is there a simple way to calculate the maximum for a row or col
On Sat, Apr 17, 2010 at 8:04 PM, Kevin Turner wrote:
> I have a frequency table that I am trying to plot on a rose diagram using
> rosavent. I've set the table up by using this line:
>
> Wind_freq_speed <- t(table(cut(Wind_Dir_vec, 0:36), cut(Wind_Speed_vec,
> seq(0, to=60, by=10
We do not h
Ya I got that result but fixing it was a mystery. especially since I will
eventually want to subtract the row max from the row Min ( or calculate the
range)
if a matrix thus is:
[,1] [,2] [,3]
[1,] NA NA NA
[2,]258
[3,] NA69
and apply(m,1,max,na.rm=TRUE)
yeilds
[1
On Apr 17, 2010, at 11:04 PM, Kevin Turner wrote:
I have a frequency table that I am trying to plot on a rose diagram
using
rosavent. I've set the table up by using this line:
Wind_freq_speed <- t(table(cut(Wind_Dir_vec, 0:36),
cut(Wind_Speed_vec,
seq(0, to=60, by=10
It produces the
On Apr 18, 2010, at 12:16 AM, steven mosher wrote:
Is there a simple way to calculate the maximum for a row or column
of a
matrix when there are NA,s present.
# given a matrix that has any number of NA per row
m<-matrix(c(seq(1,9)),nrow=3)
m
[,1] [,2] [,3]
[1,]147
[2,]2
How about RSQLite?
On 18 April 2010 12:56, kMan wrote:
> Dear list,
>
> What are the cross-platform, serverless databases in R?
>
> Sincerely,
> KeithC.
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE
Dear list,
What are the cross-platform, serverless databases in R?
Sincerely,
KeithC.
__
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 pro
?Rscript
It is also in the Intro to R manual if you had read it (section B.4).
On Sat, Apr 17, 2010 at 11:46 PM, Ayush Raman wrote:
> Hi,
>
> I am trying to call the R script using shell script and pass the input file
> as an argument to the R script. Can somebody give me some insights on this
Is there a simple way to calculate the maximum for a row or column of a
matrix when there are NA,s present.
# given a matrix that has any number of NA per row
> m<-matrix(c(seq(1,9)),nrow=3)
> m
[,1] [,2] [,3]
[1,]147
[2,]258
[3,]369
> m[3,1]=NA
> m[1,]=NA
Hi,
I am trying to call the R script using shell script and pass the input file
as an argument to the R script. Can somebody give me some insights on this
problem.
Thanks.
--
Regards,
Ayush Raman
[[alternative HTML version deleted]]
__
R-hel
I have a frequency table that I am trying to plot on a rose diagram using
rosavent. I've set the table up by using this line:
Wind_freq_speed <- t(table(cut(Wind_Dir_vec, 0:36), cut(Wind_Speed_vec,
seq(0, to=60, by=10
It produces the following table layout, which is consistent with the
rosav
Hello,
I'm getting an error when trying to create a secound R instance on the same
context, in my system R calls Fortran code that calls C++ code that ultimately
call R code again, but on this secound call I get this error.
Error in .Call("R_isMethodsDispatchOn", onOff, PACKAGE = "base") :
> library(fts)
> x <- fts(data=rnorm(1e6))
> system.time(xrnk <- moving.rank(x,500))
user system elapsed
0.680.000.68
you will have to disguise your data as a time series to use fts.
see below the exact implementation of rank that is used.
-Whit
template
class Rank {
publi
1. There is no off the shelf facility although SQLite itself allows
you to write C functions and those presumably could call R but you
would have to do it yourself.
2. There are also some solutions discussed here which might be good
enough and are a lot easier than #1:
http://code.google.com/p/sql
have used both for a while and feel they are like pea and carrot together.
it is extremely handy to use sqlite engine for heavy data management
from r instead of using r directly.
i am also wondering if i could define and register sqlite functions
within r in the way similar to how we do in python
On 17-Apr-10 23:14:32, Mark Na wrote:
> Hello,
> I have two vectors of length = 10
>
> x<-c(2,14,79,27,3,126,15,1,12,4)
> y<-rep(4,10)
>
> and I would like to create a third vector of length = 10 that
> contains the smallest value at each position in the two above vectors.
>
> I have tried:
>
>
Hey Mark,
I am sure there are other ways but one way would be:
data <- cbind(x,y) #put the two vectors in a matrix
> apply(data, 1, min) # use apply() to apply min() to each row
[1] 2 4 4 4 3 4 4 1 4 4
Best regards,
Josh
On Sat, Apr 17, 2010 at 4:14 PM, Mark Na wrote:
> Hello,
>
> I have t
Hello,
I have two vectors of length = 10
x<-c(2,14,79,27,3,126,15,1,12,4)
y<-rep(4,10)
and I would like to create a third vector of length = 10 that contains the
smallest value at each position in the two above vectors.
I have tried:
z<-min(x,y)
but that doesn't work.
With the example data a
Just after posting the question I stumbled at the site you've mentioned.
Many thanks
Ed
From: Joshua Wiley [mailto:jwiley.ps...@gmail.com]
Sent: Saturday, April 17, 2010 8:00 PM
To: Eduardo M. A. M.Mendes
Cc: r-h...@stat.math.ethz.ch
Subject: Re: [R] Where can I find library rmutil?
I believe you are referencing the rmutil by Lindsey. See his website (
http://www.commanster.eu/rcode.html ).
Josh
On Sat, Apr 17, 2010 at 3:44 PM, Eduardo M. A. M.Mendes <
emammen...@gmail.com> wrote:
> Hello
>
> I wonder whether I can find rmutil (it seem to be part of rcode or
> something
>
Hello
I wonder whether I can find rmutil (it seem to be part of rcode or something
like that)?
Many thanks
Ed
__
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/p
I am updating the Epi package.
I added functions named pc.points and pc.matpoints.
Erroneously I wrote pc.plot and pc.matplot in the NAMESPACE file and of course
got an error from Rcmd check.
So I corrected the NAMESPACE file, but I still get from r-check:
* install options are ' --no-html'
Loa
Giovanni Azua wrote:
Hello Denis,
(1) I appreciate your feedback, however, I feel I have all the right to ask a specific question related R namely what's the interpretation of the acf function plot. I gave away the information that it is a homework because many times people before helping ask wh
James,
Your problem with bwplot is with your scales definition.
bwplot places the plots at locations 1:24; you can then
supply arbitrary labels for these locations. Try changing
the following:
xlim = c(-1, 24) to xlim = c(0, 25)
at = hrs to at = hrs + 1 (or redefine hrs)
As to needing to use
Hi Derek,
have a look at the following made-up example:
f1 <- function(x){2*x}
f2 <- function(x){-10*x+1}
x<-rnorm(10)
x
(x<0)*f1(x)
(x>=0)*f2(x)
(x<0)*f1(x) + (x>=0)*f2(x)
Therefore I suggest you should specify the model as follows:
yourNLSmodel <- nls(Y ~ (X=Z) * g(X,a,d,e), data =
myData
On Apr 17, 2010, at 3:13 PM, Akito Y. Kawahara wrote:
Thanks, this is really great!
Just another quick question - if one were to calculate the mean of
this curve, what command would you suggest? "Optimize" doesn't allow
you to search for a mean value since it is only working on one point,
and
Thanks, this is really great!
Just another quick question - if one were to calculate the mean of
this curve, what command would you suggest? "Optimize" doesn't allow
you to search for a mean value since it is only working on one point,
and am just curious if there is a quick way to do this. Sorry
Hello Denis,
(1) I appreciate your feedback, however, I feel I have all the right to ask a
specific question related R namely what's the interpretation of the acf
function plot. I gave away the information that it is a homework because many
times people before helping ask what's the context for
On Apr 17, 2010, at 2:25 PM, wrote:
After some headache with debugging my script, I finally isolated the
problem taht I am going to illustrate in the following example.
I expected matrix nrow to decrease consistently till 1. Instead,
when the matrix is left with one row only, its nrow jumps
Try this indeed of as.matrix(...) :
B <- B[-1,, drop = FALSE]
On Sat, Apr 17, 2010 at 3:25 PM, wrote:
> After some headache with debugging my script, I finally isolated the
problem taht I am going to illustrate in the following example.
> I expected matrix nrow to decrease consistently till 1.
On Apr 17, 2010, at 1:18 PM, David Winsemius wrote:
On Apr 17, 2010, at 12:45 PM, Charles C. Berry wrote:
On Sat, 17 Apr 2010, Akito Y. Kawahara wrote:
Hi, I am new to R, and have a quick question regarding an R script
that I received from a kind colleague.
I am trying to determine the "p
Thanks Robin. I used the following line, which got my table looking
correct.
Wind_freq_speed <- t(table(cut(Wind_Dir_vec, 0:36), cut(Wind_Speed_vec,
seq(0, to=60, by=10
Unfortunately, the rosavent function produced a wind rose diagram that
repeats my frequency data 6 times throughout the 360
On Sat, Apr 17, 2010 at 7:25 PM, wrote:
> After some headache with debugging my script, I finally isolated the problem
> taht I am going to illustrate in the following example.
> I expected matrix nrow to decrease consistently till 1. Instead, when the
> matrix is left with one row only, its nr
After some headache with debugging my script, I finally isolated the problem
taht I am going to illustrate in the following example.
I expected matrix nrow to decrease consistently till 1. Instead, when the
matrix is left with one row only, its nrow jumps to 2 because the matrix
gets transposed.
Hello,
I'm a newbie to the community, and look forward to exploring this
platform for use with Genetic data analysis projects, and interfacing
with RDBMS. R looks like a rich arena for both! I also found the
introductory Manning book - I've used other of their 'early edition'
type books, an
Giovanni Azua gmail.com> writes:
>
> Hello,
>
> I am attending a course in Computational Statistics at
> ETH and in one of the assignments I am asked to prove
> that a time series is not autocorrelated using the R function "acf".
>
> I tried out the acf function with the given data,
> accord
On Apr 17, 2010, at 12:45 PM, Charles C. Berry wrote:
On Sat, 17 Apr 2010, Akito Y. Kawahara wrote:
Hi, I am new to R, and have a quick question regarding an R script
that I received from a kind colleague.
I am trying to determine the "peak" (maximum value) of the graph that
is plotted when
On Sat, 17 Apr 2010, Akito Y. Kawahara wrote:
Hi, I am new to R, and have a quick question regarding an R script
that I received from a kind colleague.
I am trying to determine the "peak" (maximum value) of the graph that
is plotted when executing the following. There is an input file called
"r
James Rome gmail.com> writes:
> ... does the call automatically assume that the variable
> names are from the frame in the data= statement?
Yes, it does.
How about
bwplot(tt~factor(OnHour,levels=0:23)|Runway,data=gdf,
drop.unused.levels=FALSE)
?
__
On Apr 17, 2010, at 11:01 AM, James Rome wrote:
Ah,
Well, I thought I put up just the data needed. Sorry, was wrong file.
And yes I am still climbing up the very steep learning curve hill. I
attach a better data set. If it gets stripped, it is at
http://dl.dropbox.com/u/537118/gdf.txt
1. I pu
On 2010-04-17 9:01, James Rome wrote:
Ah,
Well, I thought I put up just the data needed. Sorry, was wrong file.
And yes I am still climbing up the very steep learning curve hill. I
attach a better data set. If it gets stripped, it is at
http://dl.dropbox.com/u/537118/gdf.txt
1. I put the gdf$tt
Hello,
I am attending a course in Computational Statistics at ETH and in one of the
assignments I am asked to prove that a time series is not autocorrelated using
the R function "acf".
I tried out the acf function with the given data, according to what I found
here: http://landshape.org/enm/op
After unzipping that file, http://dl.dropbox.com/u/537118/gdf.zip , I
got a structure object that took what seemed to be an inordinately
long time to eval-parse wehn assigned to gdf, but it did eventually
produce:
> str(gdf)
'data.frame': 2656 obs. of 21 variables:
$ OnDate:Clas
Well, finally we have something that we can respond to.
Do note the following from the Posting Guide:
# No binary attachments except for PS, PDF, and some
image and archive formats (others are automatically
stripped off because they can contain malicious
software). Files in other formats and lar
Hi, I am new to R, and have a quick question regarding an R script
that I received from a kind colleague.
I am trying to determine the "peak" (maximum value) of the graph that
is plotted when executing the following. There is an input file called
"rates_values.txt" which begins as:
rateValue
0.37
On Apr 16, 2010, at 4:42 PM, Jeroen Ooms wrote:
Ah Phil Spector is right, nothing is converted. I'm almost too
embarrassed to
admit it, but actually, it was Excel that tricked me. It displays date
fields differently than they are stored in the csv file, and once
you press
'save', it save
I would like to explore dendrogam plots interactively. For example, click on a
node and return information about all of the children of that node.
Is there a high level wrapper for locator() or click() that will return the
nearest dendrogram node on a plot?
If not, is there a way to obtain the
The data are at http://dl.dropbox.com/u/537118/gdf.zip
On 4/17/2010 1:42 AM, Deepayan Sarkar wrote:
On Fri, Apr 16, 2010 at 1:54 PM, James Rome wrote:
> Dear R-Help,
>
> With the attached data set, I am still getting incorrect bwplots
>
None of your attachments came through (presumably becaus
Hi,
I thank you all who answered to my question. I think I learned a lot although
there still remain things and concepts I have to ruminate. To the questions
about the plots:
In this case, I have segmented music into so-called pitch-class sets and
further transformed them to 'set classes', equ
Is there a way to just build a madifa function in adehabitat just using a .csv
file with presences and the corresponding environmental data? I'm trying to
model the species distribution of a species using 45 environmental grids and r
crashes after loading just 5 of them. I'd like to develop the fun
Did you try to follow the advice R gives you 24 times ?
Le 17/04/10 11:57, thedoctor81877 a écrit :
I am trying to install Rcmdr on my ubuntu machine, but keep getting the
following error messages:
ERROR: failed to lock directory
‘/home/thedoctor/R/i486-pc-linux-gnu-library/2.10’ for modifying
I am trying to install Rcmdr on my ubuntu machine, but keep getting the
following error messages:
ERROR: failed to lock directory
‘/home/thedoctor/R/i486-pc-linux-gnu-library/2.10’ for modifying
Try removing ‘/home/thedoctor/R/i486-pc-linux-gnu-library/2.10/00LOCK’
ERROR: failed to lock directory
thanks, it is ok!
--
View this message in context:
http://n4.nabble.com/how-can-I-plot-the-histogram-like-this-using-R-tp1839303p2013782.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.et
I would run 200 iterations of nnet() such that optimization is done for 'f',
where f = error_cross_validation * (error_cross_validation /
error_training_set). Any guidance on how to optimize for this per-cycle
dependent variable (f) is appreciated.
Thank you,
supra
[[alternative HTML vers
55 matches
Mail list logo