Suppose I have two sets of (x,y) points like this:
x1<-runif(n=10)
y1<-runif(n=10)
A<-cbind(x1,y1)
x2<-runif(n=10)
y2<-runif(n=10)
B<-cbind(x2,y2)
I would like to measure how similar the two sets of points are.
Something like a correlation coefficient, where 0 means the two
patterns are unrelate
Hi,
I have the following string that I converted to a POSIXct:
> a <- "2009-08-24 10:00:00.213"
> a.p <- strptime(a,"%Y-%m-%d %H:%M:%OS")
> as.double(as.POSIXct(a.p))
[1] 1251122400
I can't seem to get the decimal fraction of .213 out by casting to
double or numeric. Is there anyway to make sure
Hi,
I have a couple of aggregation operations that I don't know how to
accomplish. Let me give an example. I have the following irregular
time series
time x
10:00:00.02120
10:00:00.22420
10:00:01.00219
10:00:02:948
Not sure if your context is rapache, but if so urlEncode() and urlDecode() are
available to you and are vectorized:
http://biostat.mc.vanderbilt.edu/rapache/manual.html#urlEncode
Best,
Jeff
-Original Message-
From: r-help-boun...@r-project.org on behalf of Jack Tanner
Sent: Sat 8/29/2
It is not clear that you have read the help page that arise with:
?Inf
"Note:
In R, basically all mathematical functions (including basic
Arithmetic), are supposed to work properly with +/- Inf and NaN as
input or output.
The basic rule should be that calls and relations with Infs really
Greetings. I somehow had the impression that an infinite number, as obtained
by dividing by zero, for instance, would be flagged as both missing ("NA") and
not a number ("NaN"). It appears that I was wrong on both counts, although the
is.finite function correctly returns FALSE in such a case.
See:
https://stat.ethz.ch/pipermail/r-help/2009-July/204192.html
and also other posts in that thread.
On Sat, Aug 29, 2009 at 6:02 PM, loch1 wrote:
>
> Hello everybody,
> I am trying to do a logistic regression model with lrm() from the design
> package. I am comparing to groups with different me
Yes, Kingsford. This problem does not appear to be trival. I am not sure if
there is any literature on this. I have seen a paper by Davies and Higham (BIT
2000) on "Stable generation of correlation matrices. There is also a paper by
Harry Joe on generating correlation matrices with given par
"Standard error" usually means the estimated standard deviation of a parameter
estimate, e.g. the sample mean.
Perhaps you mean the estimated standard deviation of the data. If so
sdev <- sd(x, na.rm = TRUE)
If you want the standard error of the mean there are several ways of doing it.
Perha
Mcdonald, Grant wrote:
dear sir,
i am trying to calculate the standard error of my data (x),
i have tried se(x, na.rm=TRUE)
and std.error(x)
neither have worked and i cannot find an alternative
Hi Grant,
There is a convenience function "std.error" that calculates the
conventional standa
Hello everybody,
I am trying to do a logistic regression model with lrm() from the design
package. I am comparing to groups with different medical outcome which can
either be "good" or "bad". In the help file it says that lrm codes al
responses to 0,1,2,3, etc. internally and does so in alphabetic
Or just use the 'each' argument to seq.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
> project.org] On Behalf Of Barry Rowlingson
> Se
Thanks Ravi -- with my limited linear algebra skills I was assuming
invertible symmetric was sufficient (rather than just necessary) for
positive definiteness. So, the open challenge is to generate a pd
matrix of dimension 100 with r_ij = 1 if i=j else -1< r_ij< 1, with
about 10% of the elements >
On 29/08/2009 6:05 PM, John Sorkin wrote:
For my money, and perspective as one who has written a compiler, this reflects
a failing of the R parser. Both
if (TRUE) {
cat("TRUE!!\n")
}
else
{
cat("FALSE!!\n")
}
and
if (TRUE)
{
cat("TRUE!!\n")
}
else
{
cat("FALSE!!\n
But in interactive use the R parser is constrained to work a line at a
time (unless it could predict what you were going to type next ;)
Hadley
On Sat, Aug 29, 2009 at 5:05 PM, John Sorkin wrote:
> For my money, and perspective as one who has written a compiler, this
> reflects a failing of the
For my money, and perspective as one who has written a compiler, this reflects
a failing of the R parser. Both
if (TRUE) {
cat("TRUE!!\n")
}
else
{
cat("FALSE!!\n")
}
and
if (TRUE)
{
cat("TRUE!!\n")
}
else
{
cat("FALSE!!\n")
}
are easy to read, and should be accep
Great question to put up here :)
My preferences:
1) notepad++ with NPPToR
2) tinn-R (was leading for a long time, but recently I decided to go with
notepad++ )
3) JGR / RCMDR (although RCMDR can be connected with the previous ones - and
I wish it would get more developed)
With the rest I didn't h
On 29/08/2009 12:03 PM, Corrado wrote:
I do not understand why one should use a S3 preferentially on a S4 class, if
S4 is more rigorous.
As Spencer said, most people use either one or the other. I think it's
generally a bad idea to mix them (there are strange semantics if you do
that), so us
Oliver Bandel first.in-berlin.de> writes:
[...]
> I assume for each entry in /etc/passwd until the one that os looked for,
> /etc/odbc.ini is opened once...
> ...maybe I should test this hypothesis... looks strange.
[...]
No, my loginname is in line 31 of /etc/passwd.
oli...@siouxsie:~$ grep -n
Hello,
I "strace"t the R session when trying to connect to the database.
Strange, that /etc/odbc.ini first should be opened with Append-mode:
open("/etc/odbc.ini", O_WRONLY|O_CREAT|O_APPEND, 0666) = -1 EACCES (Permission
denied)
open("/etc/odbc.ini", O_RDONLY) = 3
fstat(3, {st_mode=S_
On Sat, Aug 29, 2009 at 8:14 PM, njhuang86 wrote:
>
> Hey guys,
>
> I was wondering how to create this sequence: 1, 2, 3, 1, 2, 3, 1, 2, 3, 1,
> 2, 3... with the '1, 2, 3' repeated over 10 times.
rep(1:3,10) # rep repeats its first argument according to the number
in its second argument
> Also,
On Aug 29, 2009, at 3:14 PM, njhuang86 wrote:
Hey guys,
I was wondering how to create this sequence: 1, 2, 3, 1, 2, 3, 1, 2,
3, 1,
2, 3... with the '1, 2, 3' repeated over 10 times.
As noted earlier
rep(1:3, 10)
Also, is there a simple method to generate 1, 1, 1, 2, 2, 2, 3, 3, 3?
Hello!
mtable from memisc package shows estimates and standard error by
default. I wanted to show only the estimates. Therefore, I created a new
template:
setCoefTemplate(simple=c(est="($est:#)($p:*)"))
But this leads to the following error when used:
> mtable(berk0,berk1,berk2, coef.style="sim
I think should work
rep(c(1,2,3),10)
Alfredo
On Sat Aug 29 15:14:15 EDT 2009, njhuang86
wrote:
Hey guys,
I was wondering how to create this sequence: 1, 2, 3, 1, 2, 3, 1,
2, 3, 1,
2, 3... with the '1, 2, 3' repeated over 10 times.
Also, is there a simple method to generate 1, 1, 1,
Hey guys,
I was wondering how to create this sequence: 1, 2, 3, 1, 2, 3, 1, 2, 3, 1,
2, 3... with the '1, 2, 3' repeated over 10 times.
Also, is there a simple method to generate 1, 1, 1, 2, 2, 2, 3, 3, 3?
Anyways, any help with be greatly appreciated!
--
View this message in context:
http://
Dumblauskas, Jerry credit-suisse.com> writes:
[...]
> The alloc error means you are close...
[...]
Ah, ok, I see...
...then you are right that Driver has to be the path to
the shared library. :-)
Oliver
__
R-help@r-project.org mailing list
https://s
Dumblauskas, Jerry credit-suisse.com> writes:
>
> OK
>
> Is your PostGres server on the same Linux box you are running R on?
> Sample values
> Server = 169.49.30.69 (localhost host means you are on the same
> box)
> Port= 2700 (make sure your port is correct)
>
> Also, I a
On 29-Aug-09 17:51:54, diegol wrote:
> Max Kuhn wrote:
>> Perhaps this is obvious, but Ive never understood why this is the
>> general convention:
>>
>>> An opening curly brace should never go on its own line;
>>
>> I tend to do this:
>>
>> f <- function()
>> {
>> if (TRUE)
>> {
>> c
Let's say that location defined a group, and observations may
be more similar in a group. You could account for this similarity
with the following model.
model1 <-lme(X~CorP,random=~1|location,data=mydata,method="ML")
This fits a random intercept model grouped by location. This would
assume that
Max Kuhn wrote:
>
> Perhaps this is obvious, but Ive never understood why this is the
> general convention:
>
>> An opening curly brace should never go on its own line;
>
> I tend to do this:
>
> f <- function()
> {
> if (TRUE)
> {
> cat("TRUE!!\n")
> } else {
> cat("FAL
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Wolfgang Polasek
> Sent: Friday, August 28, 2009 3:16 PM
> To: r-help@r-project.org
> Subject: [R] Numeric, 2 ??? as a result of marix???
>
> Strange things are going on in R, if
Hi David, Phil,
Phil Spector wrote:
>> David -
>> Here's the easiest way I've been able to come up with.
Easiest? You are making unnecessary work for yourselves and seem not to
understand the purpose of ?naresid (i.e. na.action = na.exclude). Why not
take the simple route that I gave, which rea
S3 is very easy to change; S4 is very difficult. This provides
advantages and disadvantages for both. Some people swear by one and
curse the other -- from both sides.
S4 is newer, and I have had problems in the past finding out what
S4 methods are available and finding acceptabl
On Sat, 2009-08-29 at 12:56 +0100, Markus Gesmann wrote:
> Dear R-help,
>
> Suppose I have the following data:
>
> df=data.frame(x=1:10, y=c(1,2,3,4,5,12,14,16,18,20))
> plot(y~x, df, t="b")
>
> How can I fit a model which estimates the slopes between x = 1-5, 5-6,
> and 6-10?
Does the segmen
Luis,
I missed this email earlier. Consider using r-sig-debian for Debian / Ubuntu
question (but you need to subscribe before you can post).
On 7 August 2009 at 13:27, Luis Ridao Cruz wrote:
| R-help,
|
| At the moment the R version installed on my machine is 2.8.1. (Ubuntu 9.04)
| I wish to u
On Aug 29, 2009, at 7:56 AM, Markus Gesmann wrote:
Dear R-help,
Suppose I have the following data:
df=data.frame(x=1:10, y=c(1,2,3,4,5,12,14,16,18,20))
plot(y~x, df, t="b")
How can I fit a model which estimates the slopes between x = 1-5,
5-6, and 6-10?
Adding the factor f:
df$f <- gl(
Max Kuhn wrote:
Perhaps this is obvious, but Ive never understood why this is the
general convention:
An opening curly brace should never go on its own line;
I tend to do this:
f <- function()
{
if (TRUE)
{
cat("TRUE!!\n")
} else {
cat("FALSE!!\n")
}
}
(I don't usu
Peter Alspach wrote:
Tena koe
Try either
L[foo()]
or
L[[foo()]]
These return subtly (or not so subtly depending on your point of view)
different results.
which is quite important, hence read the documentation. [] returns a
list of length 1 (or a vector of length 1 of type list) where [[]]
I do not understand why one should use a S3 preferentially on a S4 class, if
S4 is more rigorous.
(The premiss is I am a newbie with OO programming in R, and would like to
understand what is the "proper" way to OO program in R )
Regards
On Saturday 29 August 2009 16:23:39 hadley wickham
Max Kuhn wrote:
Perhaps this is obvious, but Ive never understood why this is the
general convention:
An opening curly brace should never go on its own line;
I tend to do this:
f <- function()
{
if (TRUE)
{
cat("TRUE!!\n")
} else {
cat("FALSE!!\n")
}
}
(I don't u
>> An opening curly brace should never go on its own line;
>
> I tend to do this:
>
> f <- function()
> {
> if (TRUE)
> {
> cat("TRUE!!\n")
> } else {
> cat("FALSE!!\n")
> }
> }
>
> (I don't usually put one-liners in if/else blocks; here I would have
> used ifelse)
>
> I haven't
Do you know how to calculate what you want? Why not write a function-
to do it and contribute to CRAN.
On Sat, Aug 29, 2009 at 10:07 AM, tzygmund
mcfarlane wrote:
> Hi,
>
> I would like to compute a goodness-of-fit statistic for one data
> series against a t-distribution, and obtain the quantiles
Hi,
I would like to compute a goodness-of-fit statistic for one data
series against a t-distribution, and obtain the quantiles of the
distribution of the statistic with given degrees of freedom. I wonder
if this is implemented in a package.
I know that the critical values have to be computed for
Perhaps this is obvious, but Ive never understood why this is the
general convention:
> An opening curly brace should never go on its own line;
I tend to do this:
f <- function()
{
if (TRUE)
{
cat("TRUE!!\n")
} else {
cat("FALSE!!\n")
}
}
(I don't usually put one-liner
Emacs + ESS
On Thu, Aug 27, 2009 at 12:43 PM, Jonathan
Greenberg wrote:
> Quick informal poll: what is everyone's favorite text editor for working
> with R? I'd like to hear from people who are using editors that have some
> level of direct R interface (e.g. Tinn-R, Komodo+SciViews). Thanks!
>
Here is a workaround
URLdecode.vec <- Vectorize(URLdecode)
# test it out
x <- c("a%20b", "b%20c")
URLdecode.vec(x)
On Sat, Aug 29, 2009 at 10:31 AM, Jack Tanner wrote:
> In R 2.9.2,
>
>> URLdecode(c("a%20b", "b%20c"))
> [1] "a b"
> Warning message:
> In charToRaw(URL) : argument should be a cha
In R 2.9.2,
> URLdecode(c("a%20b", "b%20c"))
[1] "a b"
Warning message:
In charToRaw(URL) : argument should be a character vector of length 1
all but the first element will be ignored
Could URLdecode be modified to actually process all elements of the vector, not
just the first?
Thanks in advanc
Hi,
More of a statistical question, I'm trying to understand the formulation
of the one-sample two-sided Kolmogorov-Smirnov statistic in
stats::ks.test(), testing against a uniform distribution.
Basically, it boils down to:
x <- rnorm(100)
n <- length(x)
z <- punif(sort(x)) - (0:(n - 1)) /
Barry Rowlingson wrote:
On Fri, Aug 28, 2009 at 5:11 PM, hadley wickham wrote:
In my view, that's the purpose of indenting - you see scope from
indenting.
*cough* python *cough*
:-)
(my favorite language at the moment)
__
R-help@r-project.org m
Kingsford Jones wrote:
A few thoughts:
<...>
-- It's nice that people have made these guides available
Agreed .. it helps those relatively new to the language (and possible
other language biases) get their orientation.
Cheers,
Esmail
__
R-hel
(Ted Harding) wrote:
On 28-Aug-09 12:59:24, Esmail wrote:
Perhaps most of you have already seen this?
http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html
Comments/Critiques?
I think it is grossly over-prescriptive. For example:
"function names have initial capital let
Duncan Murdoch wrote:
On 8/28/2009 8:59 AM, Esmail wrote:
Perhaps most of you have already seen this?
http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html
Comments/Critiques?
The rules are mostly reasonable, though they aren't the ones followed in
the R source. One bad
Dear R-help,
Suppose I have the following data:
df=data.frame(x=1:10, y=c(1,2,3,4,5,12,14,16,18,20))
plot(y~x, df, t="b")
How can I fit a model which estimates the slopes between x = 1-5, 5-6,
and 6-10?
Adding the factor f:
df$f <- gl(2,5)
Allows me to fit a linear model with interaction
g does not appear to be a matrix, as described. Its more
likely a data frame. If that is the case then as.matrix(g)
will create a matrix from it.
Also depending on what you want to do ?unlist, ?t or ?c
may be of help. Also try str(g) and dput(g) to see
internals of object as they seem not to
On Sat, 29 Aug 2009 00:15:45 +0200 Wolfgang Polasek
wrote:
WP> > g=gretldata[1:2,]
WP> > g
WP>Empfang Versand Transit Inland AuslandSumS
WP> 1 787844.0 1307176.6 223395.4 1474726 16199.1 3809341
WP> 2 421473.1 306445.4 448801.2 1779402 14445.6 2970567
WP> > dim(g)
WP> [1] 2 6
WP> > a
On Sat, 29 Aug 2009 00:07:44 +0200 Wolfgang Polasek
wrote:
WP> Why is the option "last changed" not working if I open a script
WP> from R under Vista?
Because it remembers the changes only of a current session?
You should be a bit more descriptive: which editor? which R? What do
you mean with
Wolfgang Polasek wrote:
Strange things are going on in R, if you reshape a matrix in R:
g=gretldata[1:2,]
g
Empfang Versand Transit Inland AuslandSumS
1 787844.0 1307176.6 223395.4 1474726 16199.1 3809341
2 421473.1 306445.4 448801.2 1779402 14445.6 2970567
dim(g)
Levi Waldron wrote:
For posterity's sake, here is the solution I figured out. Putting the
following lines after the plot(f) command seems to set the angle correctly:
myasp <-
(par("fin")[2]-par("mai")[1]-par("mai")[3])/(par("fin")[1]-par("mai")[2]-par("mai")[4])
(f_angle <- atan(myasp)*180/pi)
On Sat, 2009-08-29 at 09:04 +1000, Duncan Mackay wrote:
> Hi Gavin
>
> I am running on windows and have no problem
Thanks for confirming that this appears to be peculiar to my system,
Duncan. I've narrowed this down to just the PDF device so nothing to do
with Sweave and / or lattice as the chara
Why is the option "last changed" not working if I open a script from R
under Vista?
Wolfgang
[[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
Strange things are going on in R, if you reshape a matrix in R:
> g=gretldata[1:2,]
> g
Empfang Versand Transit Inland AuslandSumS
1 787844.0 1307176.6 223395.4 1474726 16199.1 3809341
2 421473.1 306445.4 448801.2 1779402 14445.6 2970567
> dim(g)
[1] 2 6
> as.vector(g)
Empfang Vers
On Fri, 28 Aug 2009, Arup wrote:
Hi..I am trying to run CHAID in R..I have installed the sofyware Party and
trying to use the function ctree() to carry out the analysis. but I am
getting the following message Error in terms.default(formula, data = data) :
no terms component
Without a simple re
On Fri, 28 Aug 2009 21:39:41 -0400 "John Sorkin"
wrote:
JS> Windows Vista
JS> R 2.9.1
JS>
JS> When trying to install Rcmdr I get the message shown below. What
JS> does it mean, do I need to do anything?
JS>
JS> The downloaded packages are in
JS> C:\Users\John
JS> Sorkin\AppData\Local\Te
On Aug 29, 2009, at 2:43 AM, Sukhbir Rattan wrote:
Hi,
I have 15 CEL files of Affymetrix platform from GEO.
Title of experiment is : Ecoli_ASv2 Affymetrix E. coli Antisense
Genome
Array.
I am looking for the package available in R for this array for
annotation.
I have already tried d
64 matches
Mail list logo