Hello all,
I recently moved from the US to Africa & on changing my time zone
in the OSX system preferences from EST to GMT+3 ( East Africa) on
attempting to use read.dta using the foreign packagebegan
getting an error of:
"Error in fromchar(x) : character string is not in a standa
Dear all:
I used lm to perform a regression in R and and intercept is -0.01894 and X
is 0.185758. This is my target.
Y<-(c(0,4.95,9.95,0,2.5,20,0,1.1,2.85,0,2.5,5))
X<-(c(0.1,10,20,20,25,60,0.6,2.5,6,35,40,45))
lm(Y~X)
anova(wnlm<-lm( Y~X))
summary(wnlm<-lm( Y~X))
I catch test (Y) values and
Dear Richie:
1) I have a mistake in the code that “A.split[[1]][["time"]][i]” should
replace with “A.split[[j]][["time"]][i]”. The “test” value is “auc” which
is a cumulative rate of change of concentration with respect to time.
for (j in 1:length(A.split)){
test <- 0
for(i in 2:length(A.spli
Joyful.
I'm adapting a FORTRAN 77 package for use with R. Pretty
straightforward.
Except for a glitch it took me some time to figure out. This existing
package has subroutines which have parameters called "NA". So, I called
subroutines like
bnodes <- function(n, lst, lptr, lend, nodes, nb, n
Hi John,
to me it still seems that you have two "problems", given your first email.
The first one, if I am correct, is that you have NO admissions in one of the
groups. That is, you have Treat A, B, C, D and for one of these treatments
there is not a single admission. Then you cannot estimate a su
Scott Lamb wrote:
> Scott Lamb wrote:
>> I've tried replacing the for loop body with this:
>>
>> this_method <- split.df[[i]]
>> boxplot(elapsed~inactive, data=this_method,
>> add=TRUE, border=i, boxfill=i, outline=FALSE)
>>
>> but it has two problems:
>>
>> * it doesn't plot at
Does this give you want you want? I assume that you have to also
ignore the first column in matrixC or else you don't have a reasonable
comparison. Also your data for matrixA and matrixB did not have any
spaces between the numbers, so I just took a guess at what they should
be.
> a.m <- scan(tex
Hi, dear all:
I am a beginner. I appreciate any help or hint from you.
I am trying to do calculation with matrices. I have 3 matrices. One is
matrixA, 2nd is matrixB, and last is matrixC.
Here is matrixA:
1.8511.40.0831.001
0.8771.30.1161.33
1.9021.21.1020.302
0.8640.1261.110.252
Hi Daniel,
Sorry, it may have been clearer if I had used
"subjects" instead of "patients". The treatments
were administered to all subjects, and then in
the succeeding 12 months, some were hospitalised
and some were not. Hence only about 25% of the subjects were hospitalised.
The start of t
Hi again,
I meant some rows of sample data, rather than sample code. Sorry about that.
Daniel
-
cuncta stricte discussurus
-
-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im
Auftrag von John Field
Gesendet: S
Hi John,
I am on the slow side - can you provide sample code. How can one treatment
group have no admissions?
Let's say there are treatments W, X, Y, Z. Do you mean that NONE of the
patients who got admitted the first time and, say, received treatment X
during the first admission, have ever had
I'm trying to fit a Cox proportional hazards model to some hospital
admission data. About 25% of the patients have had at least one
admission, and of these, 40% have had two admissions within the 12
month period of the study. Each patients has had one of 4
treatments, and one of the treatment
Scott Lamb wrote:
> I've tried replacing the for loop body with this:
>
> this_method <- split.df[[i]]
> boxplot(elapsed~inactive, data=this_method,
> add=TRUE, border=i, boxfill=i, outline=FALSE)
>
> but it has two problems:
>
> * it doesn't plot at the correct x values. It
John Maindonald wrote:
> I'd like to be able to modify axlab in (C) below so that 'Inf'
> is replaced by the infinity symbol.
>
> y <- rnorm(40)
> breaks <- c(-Inf, -1, 1, Inf)
> x <- cut(y, breaks=breaks)
> plot(unclass(x), y, xaxt="n", xlab="")
>
> ## A: The following gives the axis labels "(-Inf
Thank you - that was exactly what I needed. I just discovered read.csv
understands URLs, so here it is with my actual data and formatting:
df <- read.csv("http://www.slamb.org/tmp/one-active.csv";)
split.df <- split(df, df$method)
plot(0, xlim=range(df$inactive), ylim=range(df$elapsed)
I'd like to be able to modify axlab in (C) below so that 'Inf'
is replaced by the infinity symbol.
y <- rnorm(40)
breaks <- c(-Inf, -1, 1, Inf)
x <- cut(y, breaks=breaks)
plot(unclass(x), y, xaxt="n", xlab="")
## A: The following gives the axis labels "(-Inf, 1]", etc.
axis(1, at=1:3, labels=exp
Here is one way of doing it by splitting the data and plotting each
set in a different color:
# generate some test data
mydf <- data.frame(x=runif(200), y=rnorm(200),
dataset=sample(LETTERS[1:4], 200, TRUE))
# setup the plot are for the maximum of the data
plot(0, xlim=range(mydf$x), ylim=range(my
I'm new to R and struggling to reproduce graphs I've made with gnuplot.
Example here:
http://www.slamb.org/tmp/one-active.png
I have three different data sets plotted on the same axis. (I also have
a number of samples for each X value which I displayed with quartiles
rather than plotting ever
Hi Lindsay,
Did have some difficulties as well, but got it to work using Xcode3.0,
Apple's gcc4.2preview release and gfortran 4.2.1 from Simon's web
site. This was on R-devel though, on a Mac Intel.
Can it find the jags executable say from your home directory? Have you
tried 'make check' in
Hi Miguel,
Some sample code would help but I think xpd in ?par
may be what you're looking for however it probably
would be easier/better to set the xlim values to give
more space on the right hand side of the graph or just
modify the text( at=) value to keep the numbers inside
the plot area.
--
Hi,
Thanks for this tip, I'm always amazed at the number of clever
functions built-in in R –– just wish i could think of their name
rather than reinventing the wheel.
However, I'm still stupidly stuck with this basic question: how
should a function access data in its own package?
On 30 De
You need to call boot() to create an object to pass to boot.ci().
There are lots of examples in the help pages and in the book that package
'boot' supports. From the help:
Usage:
boot.ci(boot.out, conf = 0.95, type = "all",
index = 1:min(2,length(boot.out$t0)), var.t0 = NULL
Hi Ravi -- this is a Bioconductor package, so please ask on the
Bioconductor mailing list.
There is a windows binary available
http://bioconductor.org/packages/2.1/bioc/html/Rgraphviz.html
The best way to install this and all Bioconductor packages is
> source('http://bioconductor.org/biocLite.R
On Sun, 30 Dec 2007, Ravi Vishnu wrote:
> Hi,
> I want to install Rgraphviz on a windows vista pc. The only source file
> that I found in the bioconductor homepage is a tar file. I can't install
> from this using the packages command in the R menu. I would like to get
> some tips on how I can
Hi,
I am having problem to display text that goes start inside the
plot but should go over the margins of the plot.
You can have an example of what I mean by looking at the graphs on this
page:
http://ptaff.ca/soleil/?l1pays=Canada&l1etat=Qu%C3%A9bec&l1ville=Montr%C3%A9al&year=2007&month=12&day
Hi all.
This is my first post in this forum. Finally I find a forum in the web about
R, although is not in my language.
Now I'm working with Bootstrap CI. I'd like to know how I can calculate a
Bootstrap CI for any statistic, in particular, for Kurtosis Coeficient. I
have done the following co
Yacas and Ryacas does exactly what I want. Actually I had asked previously a
question about algebra (not integration precisely) and guys here have
pointed out package Ryacas. Sorry to disturb.
francogrex wrote:
>
> This may be far-fetched:
> In Bayesian analysis to find the marginal posterior d
Thanks to both of you. I tried to work on it, but the closest I could get was:
lifelse <- function (test, y, z) {
iffy <- function(x) {
if (x) {y} else {z}
}
lapply(test, iffy)
}
> lifelse(c(TRUE, FALSE), date -1, date)
[[1]]
[1] "2007-12-29"
[[2]]
[1] "2007-12-30"
>
> d <-
Dear All,
Is there a way of I update automatically the R version and the respective
packages which I have installed on my computer? Case not, how can I know about
what packages I installed by my self on the computer?
All have a nice new year.
from miltinho, Brazil.
para armazenamento!
On Dec 30, 2007 1:19 PM, baptiste Auguié <[EMAIL PROTECTED]> wrote:
> These two functions use the dataframe "Constants", part of this package:
>
> > `L2eV` <- function(lambda)
> > {
> > data("Constants")
> > Constants$h*Constants$cel/Constants$ee/lambda ->eV
> > eV
> > }
>
On Dec 30, 2007, at 12:49 PM, Daniel O'Shea wrote:
> I am trying to refer to a variable name in a lm regression where
> the variable name is in another variable, but it does seem to
> work. Here is an example:
>
> y<-rnorm(10)
> dat<-data.frame(x1=rnorm(10),x2=rnorm(10),x3=rnorm(10))
> nam<-c
Dear R helpers,
I've successfully created a package 'constants' using package.skeleton
() with one dataframe and a few functions. However, now that I want
to add some functions and data to the package, I run into a problem.
I ran prompt(...) and moved + edited the resulting .Rd files as
appr
Quoting Prof Brian Ripley <[EMAIL PROTECTED]>:
> and on my Mac the pkg-config files are in /usr/local/lib/pkgconfig
> and /usr/lib/pkgconfig. Most likely it would work if PKG_CONFIG_PATH
> is not set, so try that first.
Thanks--but this still doesn't seem to get me anywhere (see below).
Macin
Dear Rusers,
I would like to color different sections of a histogram different colors.
I have an example that was done by "brute force" given below. Has anyone
implemented something like this in general? If not, any suggestions/pointers
on how to write a general function to do so would be most ap
I am trying to refer to a variable name in a lm regression where the variable
name is in another variable, but it does seem to work. Here is an example:
y<-rnorm(10)
dat<-data.frame(x1=rnorm(10),x2=rnorm(10),x3=rnorm(10))
nam<-c('x1','x2','x3')
library(gtools)
com<-combinations(3,2,1:3)
mod<-lm(
Hi,
I want to install Rgraphviz on a windows vista pc. The only source file that I
found in the bioconductor homepage is a tar file. I can't install from this
using the packages command in the R menu. I would like to get some tips on how
I can do the installation.
Can I just place the extracted
This may be far-fetched:
In Bayesian analysis to find the marginal posterior distribution of a
parameter it requires integration out of the so-called nuisance parameters.
Is there in R (like an equivalent to the deriv function) but to find the
expression of the integration (or an anti-derivative)?
On Dec 30, 2007, at 11:55 AM, Richard Müller wrote:
> Oops, I just sent the wrong mail. It should be the following one.
> Please
> delete my mail from 30.Dez. 17:51
>
>
> Sorry, but I don't really understand the recommended method using
> the tk-Box
> "tkGetSaveFile".
> I wrote the following c
Oops, I just sent the wrong mail. It should be the following one. Please
delete my mail from 30.Dez. 17:51
Sorry, but I don't really understand the recommended method using the tk-Box
"tkGetSaveFile".
I wrote the following code:
X11()
# some code to generate a plot on the screen omitted
res <-
> Macintosh:Desktop ljs$ echo $PKG_CONFIG_PATH
> /usr/local/bin
is unlikely to be correct. A typical Linux setting is
PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig
and on my Mac the pkg-config files are in /usr/local/lib/pkgconfig and
/usr/lib/pkgconfig. Most likely it would
> > ...
> > I experimented with tkgetSaveFile(). But in the moment the user
> > gives the
> > filename the file is not yet generated! And I can't generate it in
> > advance,
> > because the filename is not yet specified.
>
> I don't see why this is a problem. In tkgetSaveFile(), the user can
> just
I was wondering if anyone had created a graph of a single tree created
by the randomForest call. Perhaps obtaining the tree information using
"getTree" in the randomForest package.
Many thanks for any advice,
Joe Retzer
__
R-help@r-project.org maili
Greetings,
I wonder if anyone can offer any help or advice--even direction to an
appropriate source of advice. I am trying to install rjags 1.0.1 on Mac OS X
10.5 (see http://www-fis.iarc.fr/~martyn/software/jags/). I have R.app 2.6.1
installed.
JAGS 1.0.1 is apparently successfully installed. I
1. Please read the last line on every message to r-help and in particular
the part about providing reproducible code when you post.
2. Your third argument to apply is wrong. sharpe is a function but
sharpe(...whatever...) is not. Suggest you carefully review the
examples on the ?apply page if th
Hi R users,
could anyone guide me in the right direction reg. the column-wise
application of a function on a zoo dataframe.
The tseries function sharpe() can only be applied to a univariate time
series. Suppose you have merged the returns of two assets with
get.hist.quote(), i.e.
set <- merge
On Dec 30, 2007 10:47 AM, Peter Dalgaard <[EMAIL PROTECTED]> wrote:
> Gabor Grothendieck wrote:
> > Read the warning in ?ifelse
> Yep.
>
> And, yes, it is annoying that ifelse() strips attributes, including
> class, but it is one of those things that have been in the S languages
> "forever", and no
Thank you, Peter!
The Unicode sequence "\u00e2" for "â" is the ticket.
While it is true that I can just use â in my TclTk code, when I use
package.skeleton(name="unicode test"), the R code changes my unacceptable â
to to indicate an error. My code will still run, of course, but
doesn't displa
Gabor Grothendieck wrote:
> Read the warning in ?ifelse
Yep.
And, yes, it is annoying that ifelse() strips attributes, including
class, but it is one of those things that have been in the S languages
"forever", and nobody really wants to mess with. The fundamental issue
is that you need the re
Charles Annis, P.E. wrote:
> Greetings, R-Helpers:
>
> A year ago or so I was able to use the non-ascii character â in my TclTk.
> (You can type it on Windows as 0226) I can use something like
> expression(hat(a)) elsewhere in R, but I seem to be doing something wrong
> when I try that syntax in T
49 matches
Mail list logo