You can list them together using | (which stands for 'or'):
c-subset(c,!rownames(c) %in% grep(.1|.5|.6|.9,rownames(c),value=T))
but . means any character for regular expressions, so if you meant a
decimal place, you probably want to escape them with a \\:
c-subset(c,!rownames(c) %in%
My mistake... last alternative should be:
c-subset(c,regexpr(\\.1|\\.5|\\.6|\\.9,rownames(c)) 0)
--- Stephen Tucker [EMAIL PROTECTED] wrote:
You can list them together using | (which stands for 'or'):
c-subset(c,!rownames(c) %in%
grep(.1|.5|.6|.9,rownames(c),value=T))
but
If by 'position' you mean the distance from the axes, I think 'mgp' is the
argument you are looking for (see ?par)-
You can set this in par(), plot() [which will affect both x and y labels], or
title():
par(mar=rep(6,4))
plot(NA,NA,xlim=0:1,ylim=0:1,xlab=X,ylab=)
title(ylab=Y2,mgp=c(4,1,0))
if
This is such a common question that it has a an FAQ-like response from
Doug Bates. Google lmer p-values and all that to find the response.
Isn't this a different question, though, since Jean-Baptiste is using
nlme.
Details on the calculation of DF in nlme can be found in chapter 4 of
the
On Mon, 25 Jun 2007, Stephen Tucker wrote:
My mistake... last alternative should be:
c-subset(c,regexpr(\\.1|\\.5|\\.6|\\.9,rownames(c)) 0)
Or, more readably,
c - subset(c, regexpr(\\.(1|5|6|9), rownames(c)) 0)
--- Stephen Tucker [EMAIL PROTECTED] wrote:
You can list them
Dear R-help users, I have a question concerning re-writing a function in R:
Suppose I have the data, y is number of successes and N is total number of
trials and x is the variable
(example:)
x y N
1 10 150
0 1 100
I want to estimate the risk ratio by
Weiwei Shi wrote:
Hi, there:
Suppose I have a couple of data.frames and each one has five columns
(one for x-axis, two for y-axis and two for std of y's.) There is
another dimensions (besides x and y) which is continuous. My question
is, how to plot such series of data frames in one plot
Hi all,
Hopefully this will be quick, I'm looking for pointers to packages/
functions that would allow me to calculate the power of a t.test when
the DV has measurement error. That is, I understand that, ceteris
paribus, experiments using measure with more error (lower
reliability) will
If you get the running process to write its results to file, then you
could run a loop in R asking it to repeatedly read the file and plot
the contents. It may work best if you plot to a file like a pdf.
On 22-Jun-07, at 1:06 PM, Charles Cosse wrote:
Hello,
i'm trying to find a more
Hi All,
a colleague wants to calculate the Fisher information matrix for a model he
wrote (not in R). He can easily get the neg-log-likelihood and the best fit
parameters at the minimum. He can also get negLLs for other parameter values
too.
Given these data, is there a way in R to calculate
Ich werde ab 25.06.2007 nicht im Büro sein. Ich kehre zurück am
28.06.2007.
in dringenden Fällen bin ich unter 079 79 73 74 6 erreichbar
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting
I'm slowly moving my statistical analysis from Matlab to R, and find myself
missing two features:
a) How do I mimic Matlab's 'hold on'? (I want to show several plots
together, when I type two plots one after the other the second overwrites
the first)
b) How do I mimic Matlab's 'axis'? (after
Function fdHess (in the nlme package) may be useful,
hth, ingmar
On 26 Jun 2007, at 13:58, Federico Calboli wrote:
Hi All,
a colleague wants to calculate the Fisher information matrix for a
model he
wrote (not in R). He can easily get the neg-log-likelihood and the
best fit
parameters
Hi -
What is the limit (rows and columns) on the size of a data set that R
will process?
Thanks.
Abhijit
Dr. Abhijit Roy
Citi - Global Consumer Group - Business Analytics and Methods
O: 91 80 4041 6398
Fax: 91 80 2211 0827
[[alternative HTML version deleted]]
Hi, is there any possibility to recover the history of executed R code
in the RGui when it has crashed?
Thanks in advance
Sigbert Klinke
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the
Sigbert Klinke wrote:
Hi, is there any possibility to recover the history of executed R code
in the RGui when it has crashed?
Thanks in advance
Sigbert Klinke
Hello,
It might be too much of an overkill, but one possible thing is to use
?taskCallbackManager to save the history after
Hi,
You can use the function hessian() in the package numDeriv. This will
yield a very accurate estimate of the observed Fisher information matrix.
library(numDeriv)
?hessian
Ravi.
---
Ravi Varadhan, Ph.D.
On Tue, 26 Jun 2007, Roy, Abhijit wrote:
Hi -
What is the limit (rows and columns) on the size of a data set that R
will process?
2^31-1 for each (in a data frame, that number of elements for a matrix).
See ?Memory-limits
Most likely your computer imposes lower limits.
Thanks.
Abhijit
for the following example dataset:-
Category Variable 1 127 1 261 1 142 1 183 1 234 1 162 2 173 2 321 2 168 2
197 2 213 2 261 3 198 3 126 3 167 3 154 3 134 3 187 3 109 3 210
I have performed Anova on the measured variable (column#2) for the groups
1,23 (column#1). Now I want to randomize the
Hello everybody
My collegue and I noticed a strange behaviour of R on different
platforms. It's a simple computation, but results are rather different.
On Windows XP:
floor(log(8,2))
[1] 3
which is what one should expect.
Here's instead the result with Mac OS X (same version, 2.5.0
According to the description of floor(), the latter result is the
correct one:
'floor takes a single numeric argument x and returns a numeric vector
containing the largest integers *not greater than* the corresponding
elements of x.' (emphasis added)
floor(3) == 2
True
On 26-Jun-07, at
On 6/26/2007 10:20 AM, Mike Lawrence wrote:
According to the description of floor(), the latter result is the
correct one:
'floor takes a single numeric argument x and returns a numeric vector
containing the largest integers *not greater than* the corresponding
elements of x.'
I'm trying to create a function which will allow me to subset a data set
based on values of various specified variables. I also want to then
apply some other function(s) (e.g., summary).
This is what I've tried so far
test.fx - function(dta, expvar, expval) {
+ newdta - subset(dta,
Hi!
I have written an R-package
(http://tocsy.agnld.uni-potsdam.de/wavelets/index.html) in R 2.4.1
that requires the ts() function. Users using R 2.5.0 now have a
problem installing this package. I checked the package using R 2.5.0:
___
*
dear R experts:
I am of course no R experts, but use it regularly. I thought I would
share some experimentation with memory use. I run a linux machine
with about 4GB of memory, and R 2.5.0.
upon startup, gc() reports
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 268755 14.4
On 6/26/07, El-ad David Amir [EMAIL PROTECTED] wrote:
a) How do I mimic Matlab's 'hold on'? (I want to show several plots
together, when I type two plots one after the other the second overwrites
the first)
par(new=T) (see ?par)
Yet, it often better, after a call to the 'plot' command, to
Hi
as you did not specify your code (which you said it had failed) I try to
give you a suggestion how I would do such tasks.
for (i in 1:100) {
sample(something, no, replace =TRUE)
result -perform a test
store.a result[i] - result
}
Regards
Petr
[EMAIL PROTECTED] napsal dne 26.06.2007
I was going through the config.log after installing R successfully on a
Linux ppc64 machine. However, I could not install the MCMCpack and looked at
the config.log file for gcc and g++ errors.I found some of them and have
pasted them below. Please let me know if they can affect the installation of
I don't know of a current package that does this (others may), but if
you know what you expect your data to look like you can simulate it and
calculate power that way.
Basically, write a function that will simulate data with the level of
measurement error that you expect in the real data (or have
Here is one approach:
tmp - scan()
1: 1 127 1 261 1 142 1 183 1 234 1 162 2 173 2 321 2 168 2
20: 197 2 213 2 261 3 198 3 126 3 167 3 154 3 134 3 187 3 109 3 210
41:
Read 40 items
my.df - as.data.frame( matrix(tmp, ncol=2, byrow=TRUE) )
names(my.df) - c('Category','Variable')
Thanks Greg, I've actually been programming precisely what you
suggest since sending the request this morning (though your email was
indeed helpful; I've never seen 'replicate()' and will see if it's
faster than a loop).
However, I was hoping that an analytic solution was extant and
I haven't seen a reply to this, so I will offer a comment in case
you haven't already solved the problem.
Have you consulted the Mixed-Effects Bible for S-Plus / R,
Pinheiro and Bates (2000) Mixed-Effects Models in S and S-Plus
(Springer)? If yes, have you worked through
For a), if you really want the plots overlayed, it is best to use
something like matplot, or use the points or lines function to add the
later plots to the first. You can also get the overlay effect using
par(new=TRUE), but then you need to be careful with axis labels and
scales and the plot may
the data set limit depends on your hardware capabilities
Justin BEM
Elève Ingénieur Statisticien Economiste
BP 294 Yaoundé.
Tél (00237)9597295.
- Message d'origine
De : Roy, Abhijit [EMAIL PROTECTED]
À : r-help@stat.math.ethz.ch
Envoyé le : Mardi, 26 Juin 2007, 13h09mn 40s
Objet : [R]
Sorry, my mistake. I should really leave looking at the help list
until AFTER my morning coffee :P
On 26-Jun-07, at 11:31 AM, Duncan Murdoch wrote:
On 6/26/2007 10:20 AM, Mike Lawrence wrote:
According to the description of floor(), the latter result is the
correct one:
'floor takes a
When I try to plot two lines ( or scatterplots) with different scales, this
is what I have been doing:
Suppose: I have y1 and y2 in a very different scale
y1 = 1:100
y2 = c(100:1)*10
To plot them on top of each other and denote by different colors: I have to
figure out the correct scale '10'
ts() is in package stats, and has been for some years.
Package ts was removed at the same time. The NEWS item say
o The autoloading of ts() is defunct.
which is very far from your misquote.
The problem is in the data directory of your package. E.g.,
sowas/data/air.R has
The R Data Import/Export Manual points out several ways in which you can
use read.csv more efficiently.
On Tue, 26 Jun 2007, ivo welch wrote:
dear R experts:
I am of course no R experts, but use it regularly. I thought I would
share some experimentation with memory use. I run a linux
This seems useful, but it is important to note that the approach may not
work well
unless the system of nonlinear equations is very well behaved and a good
starting
point is chosen. A good explanation of the problems with this exact
approach, that
is adding up the sums of squares of the
On Tue, 26 Jun 2007, Fausto Galli wrote:
Hello everybody
My collegue and I noticed a strange behaviour of R on different
platforms. It's a simple computation, but results are rather different.
On Windows XP:
floor(log(8,2))
[1] 3
which is what one should expect.
Here's instead the
Local minima, other than the actual roots, will be present only when the
Jacobian of the system is singular. If the Jacobian is well-behaved then
there should be no problem, although this is hard to verify in practice.
Furthermore, as I had pointed out in one of my previous emails, if
convergence
Is there a function that calculates the inter-rater agreement index
(kappa) in R?
Thanks ../Murli
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
On 26-Jun-07, at 8:12 AM, Mike Lawrence wrote:
Hi all,
Hopefully this will be quick, I'm looking for pointers to packages/
functions that would allow me to calculate the power of a t.test when
the DV has measurement error. That is, I understand that, ceteris
paribus, experiments using measure
Dear all:
When I am trying to get the marginal effects:
summary(result7,adv_inc_ratio=mean(m9201
$adv_inc_ratio),adv_price_ratio=mean(m9201$adv_price_ratio), ...(SOME
MORE CONTINUOUS AND DISCRETE VARIABLES BUT I AM NOT LISTING)... regW=c
(0,mean(m9201$regW),1),
Google 'R-help kappa' -
https://stat.ethz.ch/pipermail/r-help/2006-April/104605.html
On 6/26/07, Nair, Murlidharan T [EMAIL PROTECTED] wrote:
Is there a function that calculates the inter-rater agreement index
(kappa) in R?
Thanks ../Murli
[[alternative HTML version deleted]]
Hi,
I swear I have read almost all the posted messages about this issue, but
it's evident I couldn't find an answer (surely esay) to my problem. What
I want is the following:
Make 8 days aggregates from a daily series like this (dput output):
structure(c(6.91777181625366, 0.79051125049591,
On Tuesday 26 June 2007 10:14, Nair, Murlidharan T wrote:
Is there a function that calculates the inter-rater agreement index
(kappa) in R?
Thanks ../Murli
I have found a couple useful approaches:
# PCC, kappa, rand index
require(e1701)
classAgreement(2x2.table)
# kendall's tau
cor(x,y,
hi all, sorry for this basic question, I think I know I should use ?apply, but
it is really confusing me...
I want to create a matrix by comparing two vectors. Eg:
test-seq(1:10)
fac-c(3,6,9)
and i want to end up with a 10*3 matrix with a boolean that tests if testfac,
so something like:
1
outer(test, fac, )
-b
On Jun 26, 2007, at 2:13 PM, Van Campenhout Bjorn wrote:
hi all, sorry for this basic question, I think I know I should use ?
apply, but it is really confusing me...
I want to create a matrix by comparing two vectors. Eg:
test-seq(1:10)
fac-c(3,6,9)
and i want
Minyu Chen wrote:
Dear all:
When I am trying to get the marginal effects:
summary(result7,adv_inc_ratio=mean(m9201
$adv_inc_ratio),adv_price_ratio=mean(m9201$adv_price_ratio), ...(SOME
MORE CONTINUOUS AND DISCRETE VARIABLES BUT I AM NOT LISTING)... regW=c
(0,mean(m9201$regW),1),
On Tue, 26 Jun 2007, antonio rodriguez wrote:
Hi,
I swear I have read almost all the posted messages about this issue, but
it's evident I couldn't find an answer (surely esay) to my problem. What
I want is the following:
Make 8 days aggregates from a daily series like this (dput output):
On 26-Jun-07, at 2:36 PM, Mike Lawrence wrote:
On 26-Jun-07, at 8:12 AM, Mike Lawrence wrote:
Hi all,
Hopefully this will be quick, I'm looking for pointers to packages/
functions that would allow me to calculate the power of a t.test when
the DV has measurement error. That is, I understand
try this:
test - 1:10
fac - c(3, 6, 9)
outer(test, fac, ) * 1
I hope it helps.
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax:
Hello,
I am using survreg for a simulation where data is randomly generated from a
Weibull distribution and the model parameters estimated. When this is
embedded within a loop and the process repeated for different datasets, the
program aborts after a few runs in most cases giving the following
Achim Zeileis escribió:
On Tue, 26 Jun 2007, antonio rodriguez wrote:
Hi,
I swear I have read almost all the posted messages about this issue, but
it's evident I couldn't find an answer (surely esay) to my problem. What
I want is the following:
Make 8 days aggregates from a daily
See packages concord and psy,
hope this helps,
Washington S. Silva
On Tuesday 26 June 2007 10:14, Nair, Murlidharan T wrote:
Is there a function that calculates the inter-rater agreement index
(kappa) in R?
Thanks ../Murli
I have found a couple useful approaches:
# PCC, kappa,
On Tue, 2007-06-26 at 20:10 +0200, antonio rodriguez wrote:
Hi,
I swear I have read almost all the posted messages about this issue, but
it's evident I couldn't find an answer (surely esay) to my problem. What
I want is the following:
Make 8 days aggregates from a daily series like
Hello!
I have a data set with almost 2,000 variables (called 'Data').
I want to select only a set of variables that have a certain string in
them (e.g., Variable) - 'Variable.1', 'Variable.2', etc. until
'Variable.20'.
2 questions:
1. How can I determine the exact column index of a variable in
Dear all,
I have been stuck on this problem, am rather struggling and would
appreciate some advice if anyone can help. I apologise if this is a
bit long-winded, but I've tried to limit it to the bare essentials,
but don't know how to make it more generic!
I have some slightly odd real world data
you could look at the following link
http://mathesaurus.sourceforge.net/octave-r.html
It may help you to translate your matlab code.
good luck
AA.
Sebastian Kruk wrote:
Hi all!
I would like to import a matlab or gauss code to R.
Could you help me?
Bye,
Sebastián.
1. which(Exat Name == names(Data) ## Assuming Data is your data.frame
2. grep(Variable, names(Data))
Xiaohui
Dimitri Liakhovitski wrote:
Hello!
I have a data set with almost 2,000 variables (called 'Data').
I want to select only a set of variables that have a certain string in
them
Dear all,
sorry to bother you but I was looking for the scale Inverse Chi square
distribution and I could not find it!
If I remember well , when X~Scale-Inv-Chi-Square (a,b) then
X~Inv-Gamma(a/2,a*b/2) but with the shape, scale and rate parameters I always
get confused!
Any suggestions?
In case you really want to use the apply variety, here is another one,
sapply(fac,function(x)ifelse(test/x1, 1, 0))
H.
Van Campenhout Bjorn [EMAIL PROTECTED] 6/26/2007 11:13:14 AM
hi all, sorry for this basic question, I think I know I should use ?apply, but
it is really confusing me...
I
I think it has been pointed out but
look at ?points and ?lines and ?par
and have a look a the following link
http://mathesaurus.sourceforge.net/octave-r.html
good luck.
A.
- Original Message -
From: El-ad David Amir [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Sent: Tuesday, June 26,
I am using RODBC to collect data from an ODBC connection to an MS Access
Database. Everything seems to be working well except datetimes between
March 12, 2006 02:00 and 02:59 get moved one hour forward. This does not
seem to be happening with Excel connecting to the same connection. March 12
Here are two ways:
## method 1
plot(1:100,y1)
par(new=TRUE)
plot(1:100,y2,xlab=,ylab=,col=2,axes=FALSE)
axis(4,col=2,col.axis=2)
## method 2
plot.new()
plot.window(xlim=c(1,100),ylim=range(y1))
points(1:100,y1)
axis(1)
axis(2)
title(xlab=x,ylab=y1)
plot.window(xlim=c(1,100),ylim=range(y2))
Hi K,
Devarajan, Karthik wrote:
Does anyone have any suggestions\thoughts
Hard to say where the problem(s) originate(s). Why don't you provide
commented, minimal, self-contained, reproducible code as is recommended
on all messages on this mailing list?
This would make it much easier to
Hi all,
I have a dataset of censored observations which contains 2 variables
which I wish to account for in a time-dependent manner (tumour
recurrence and subsequent treatment of that recurrence). Hence I need to
convert the data to counting process notation. survSplit and the like do
a nice job
I think something like this will do it for you.
set.seed(1)
n - 10
x - data.frame(a=sample(1:100,n), b=sample(1:100,n),d=sample(1:100,n))
x$a[c(1,5)] - NA
x$b[c(7,6,4)] - NA
x$d[c(5,8)] - NA
x$total - rowSums(x, na.rm=TRUE)
x$type - sample(1:3, n, replace=TRUE)
by(x, list(x$type), function(z){
I think what you are trying to do is quite tricky. Here is one way you
might like to think about.
tdat - data.frame(a = 1:5, b = c(1:3, 101,101))
tdat
a b
1 1 1
2 2 2
3 3 3
4 4 101
5 5 101
test.fx - function(dta, expvar, expval) {
lang - substitute(subset(dat, v1 v2),
In response to those who asked for a better explanation of what the
Vilno software does, here's a simple example that gives some idea of
what it does.
LABRESULTS is a dataset with multiple rows per patient , with lab
sodium measurements. It has columns: PATIENT_ID, VISIT_NUM, and
SODIUM.
DEMO is
BioC2007: Where Software and Biology Connect
August 6-7 in Seattle, WA, USA
** Early registration ends July 1 **
This conference highlights developments in and beyond Bioconductor. A
major goal is to discuss the use and design of software for analyzing
high throughput biological data.
Format:
This is not surprizing at all!
The exact result is log(8,2) = 3, but the numerical
procedure which calculates the logarithm may produce a
result which is a few ULPs different from the exact
one, i.e. you can get that log(8,2) = 2.99
and then floor(2.99) = 2.
--- Fausto
I am using RODBC to collect data from an ODBC connection to an MS Access
Database. Everything seems to be working well except datetimes between
March 12, 2006 02:00 and 02:59 get moved one hour forward. This does not
seem to be happening with Excel connecting to the same connection. March
Hi
I have two tree and i want compute error of each tree and then cmparison
with t.test.
I cant coding this problem.Could i help me?
Regards
-
[[alternative HTML version deleted]]
__
75 matches
Mail list logo