On Thu, 30 Jun 2005, Philip Bermingham wrote:
What is the best way to set up a project in visual studio, work on R and
re compile? Is it better to use a different compiler or programming
environment? I specifically want to work on C and Fortran extensions.
See the `R Installation and
Hello,
I am trying to fit a nonlinear model of the form of:
A*x^b*exp(-c*x)
This represents a lactation curve. I have a bunch of cows, so I want
COW to be a random effect.
I have been trying the following code with very littel success:
fm1 - nlme(yield ~ A*(DIM^B)*(exp(-C*DIM)),
+
Dear All,
I'm classifying some data with various methods (binary classification). I'm
interpreting the results via a confusion matrix from which I calculate the
sensitifity and the fdr. The classifiers are trained on 575 data points and my
test set has 50 data points.
I'd like to calculate
One filter is enough:
to: r-help
Xiaohua
On 6/30/05, Matthew Nelson [EMAIL PROTECTED] wrote:
A clarification: this only works properly when the To addresses are
in separate filters.
Sorry for the confusion.
Matt
On 6/30/05, Matthew Nelson [EMAIL PROTECTED] wrote:
Doug,
I
Hi All,
I'd like to ask for a few clarifications. I am doing some calculations
over some biggish datasets. One has ~ 23000 rows, and 6 columns, the
other has ~62 rows and 6 columns.
I am using these datasets to perform a simulation of of haplotype
coalescence over a pedigree (the datestes
I write a function to get the frequency and prop of a variable.
freq-function(x,digits=3)
{naa-is.na(x)
nas-sum(naa)
if (any(naa))
x-x[!naa]
n-length(x)
ta-table(x)
prop-prop.table(ta)*100
res-rbind(ta,prop)
rownames(res)-c(Freq,Prop)
cat(Missing value(s) are,nas,.\n)
cat(Valid case(s) are,n,.\n)
My apologies in advance for my thickness but I can't seem to solve the
following, seemingly simple, data manipulation problem:
I have a data frame that contains multiple factors and multiple
continuous response variables, but duplicates of some factor
combinations. The duplicates contain bad
Not really an R question.
Most classifiers will produce predicted probabilities, and you can check
their accuracy. There are lots of details in my PRNN book, and some
examples in MASS4.
I suggest you adjust your training and test sets to be more nearly equal,
or use cross-validation.
I
Please allow me an unusual question.
Is there any way that R can be closely integrated with a Microsoft
Powerpoint presentation? I would like to embed R calculations in
Powerpoint so that I will start Powerpoint, be prompted to enter some
parameters, and an R function will run and return values
Now package relax is on CRAN.
The name relax is short for
R Editor for Literate Analysis and lateX
The main element of package relax is the function relax() which starts an
all-in-one editor for data analysis and easy creation of LaTeX based
documents
with R.
After calling relax() it
Hi,
Is it possible ti put the legend out of a barplot?
tanks
Sabine
-
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch mailing list
My suggestion is that you try to vectorize the computation as much as you
can.
From what you've shown, `new' and `ped' need to have the same number of
rows, right?
Your `off' function seems to be randomly choosing between columns 1 and 2
from its two input matrices (one row each?). You may want
I would like to express my thanks to the many people who got together
and developed the R project. The idea, and work, of organizing and, for
no compensation, supporting an open software project must have been (and
still be) daunting. It is clear that the availability of a free,
high-quality
Is this close to what you want?
air.sub - do.call(rbind, lapply(split(airquality, airquality$Month),
+function(d) d[which.max(d$Solar.R),]))
air.sub
Ozone Solar.R Wind Temp Month Day
514 334 11.5 64 5 16
6NA 332 13.8 80 6 14
7
On Fri, 2005-07-01 at 14:04 +0200, Navarre Sabine wrote:
Hi,
Is it possible ti put the legend out of a barplot?
tanks
Sabine
I presume that you mean outside the plot region?
If so, you can use something like the following:
# Adjust the plot margins to make room for the
# legend
Here is a different approach I only send since the result is slightly
different in that two rows are returned for Month 9 and the original row
number is retained.
max2-function(x){max(x,na.rm=T)}
MonthMax-ave(Solar.R,Month,FUN=max2)
new-subset(airquality,Solar.R==MonthMax)
Gabor == Gabor Grothendieck [EMAIL PROTECTED]
on Thu, 30 Jun 2005 07:28:30 -0400 writes:
Gabor On 6/29/05, Jing Shen [EMAIL PROTECTED] wrote:
I am planning to plot my data on log scale (y-axis). There is a
parameter in plot function, which is
plot( ..., log=y, ...)
In principle you are there, just after opening the device set par(mar)
appropriate (large margin to place the legend in) before starting with
plotting.
In the legend, specify points which virtually are in the margin you have
already expanded...
Uwe Ligges
Ghosh, Sandeep wrote:
Thank guys! Both solutions do what I need. Thanks.
Hank
On Jul 1, 2005, at 8:45 AM, Jim Brennan wrote:
Here is a different approach I only send since the result is slightly
different in that two rows are returned for Month 9 and the original
row
number is retained.
On 7/1/05, Martin Maechler [EMAIL PROTECTED] wrote:
Gabor == Gabor Grothendieck [EMAIL PROTECTED]
on Thu, 30 Jun 2005 07:28:30 -0400 writes:
Gabor On 6/29/05, Jing Shen [EMAIL PROTECTED] wrote:
I am planning to plot my data on log scale (y-axis). There is a
parameter in
On Mon, 2005-06-27 at 13:18, Prof Brian Ripley wrote:
On Mon, 27 Jun 2005 [EMAIL PROTECTED] wrote:
in an LDA analysis with n groups n-1 LD functions result. Implicitly this
defines an LD fucntion for the last group. Does there exist code already
to explictly construct this LD function?
On Fri, 1 Jul 2005 [EMAIL PROTECTED] wrote:
On Mon, 2005-06-27 at 13:18, Prof Brian Ripley wrote:
On Mon, 27 Jun 2005 [EMAIL PROTECTED] wrote:
in an LDA analysis with n groups n-1 LD functions result. Implicitly this
defines an LD fucntion for the last group. Does there exist code already
On 6/30/05, Alex Bach [EMAIL PROTECTED] wrote:
Hello,
I am trying to fit a nonlinear model of the form of:
A*x^b*exp(-c*x)
This represents a lactation curve. I have a bunch of cows, so I want
COW to be a random effect.
You need to decide which of the model parameters (i.e. A, B and C)
Hello
I'm working with DNA microarrays and want to classify them with SVM. I
want to plot the results and it's imposible for me. I found others
tutorials and examples (with iris and cats data) where you can plot the
results with plot.svm, but you need to write a formula and I don't know
how
On Fri, 1 Jul 2005, John Sorkin wrote:
Please allow me an unusual question.
Is there any way that R can be closely integrated with a Microsoft
Powerpoint presentation? I would like to embed R calculations in
Powerpoint so that I will start Powerpoint, be prompted to enter some
parameters,
i dont use gmail, but this method *may* run into problems if people are
replying to a message and r-help is on the cc: line.
thunderbird has a to: or cc: option for this... is gmail's to: field a
default for to: or cc: ?
-s.
Deepayan Sarkar wrote:
On 6/30/05, Douglas Bates [EMAIL PROTECTED]
See ?sprintf
#e.g. Replace your prop line with:
prop-sprintf(%.2f%%, prop.table(ta)*100)
_
mailto:[EMAIL PROTECTED]
Kenneth Ray Hobson, P.E.
Oklahoma DOT - QA IAS Manager
200 N.E. 21st Street
Oklahoma City, OK 73105-3204
(405) 522-4985, (405) 522-0552 fax
Visit our website at:
Yes, Douglas has proved this.
On 7/1/05, Suresh Krishna [EMAIL PROTECTED] wrote:
i dont use gmail, but this method *may* run into problems if people are
replying to a message and r-help is on the cc: line.
thunderbird has a to: or cc: option for this... is gmail's to: field a
default
Sure. Just run R in a BAT file. You just reference the BAT file in
PowerPoint like any other EXE application via an OLE link. Of course you
can always use VBA code in Powerpoint to Shell() to the BAT program.
In R, type ?BATCH to see how the BAT file's content line should be coded to
run
On 30 Jun, 2005, at 21:20, Stephen Choularton wrote:
Hi
Is there some function R that multiplies each coefficient by the
standard deviation of the corresponding variable and produces a
ranking?
Possibly you meant un-signed coefficients? In which case something like
function(model)
Dear Listers,
I know it is far off topic. But I do know there must be some people
here who know it very well.
Sorry for bothering others.
Thanks.
--
WenSui Liu, MS MA
Senior Decision Support Analyst
Division of Health Policy and Clinical Effectiveness
Cincinnati Children Hospital Medical
I have x,y data on three animals (~150 data points each). I have calculated
the fixed kernel home range using the 'adehabitat' library and the LSCV
smoothing factor. Can anyone provide me with some help on how to display
the density estimate of the Utilization Distribution 3-dimensionally?
On Fri, 2005-07-01 at 19:40 +0800, ronggui wrote:
I write a function to get the frequency and prop of a variable.
freq-function(x,digits=3)
{naa-is.na(x)
nas-sum(naa)
if (any(naa))
x-x[!naa]
n-length(x)
ta-table(x)
prop-prop.table(ta)*100
res-rbind(ta,prop)
rownames(res)-c(Freq,Prop)
Dear List:
I am generating a series of plots iteratively using Sweave. In short, a
dataframe is subsetted row by row and variable graphics are created
conditional on the data in each row. In this particular case, this code
ends up generating 17,000 individual plots.
In some cases, all student
On 7/1/05, Doran, Harold [EMAIL PROTECTED] wrote:
Dear List:
I am generating a series of plots iteratively using Sweave. In short, a
dataframe is subsetted row by row and variable graphics are created
conditional on the data in each row. In this particular case, this code
ends up generating
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Fabulous, it works great. I didn't know about approx().
Thank you
-Original Message-
From: Gabor Grothendieck [mailto:[EMAIL PROTECTED]
Sent: Friday, July 01, 2005 1:54 PM
To: Doran, Harold
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] Lines for plot (Sweave)
On 7/1/05, Doran, Harold
Of course there are many ways to do it.
The user input could come from R dialogs via the tcltk package or the
Input() dialogs from VBA in Powerpoint.
I chose the output as PDF. The R source code called cars.r, might go
something like:
pdf(file=paste(getwd(), /, cars.pdf, sep=),
width =
...snip...In PowerPoint, click the menu item Insert | Object | Create and
browse to
and select the cars.r file. ...snip...
In the previous post snippet above, replace cars.r with cars.bat.
To run the cars.bat program via VBA, I would typically insert a button. To
do so in PowerPoint, right
Hi, all:
I have a program here but it runs slow and I am wondering if there is
some place I can change to make it run faster.
Two lists, scd and c1, like this:
scd[1:2]
[[1]]
[1] 54 241
[[2]]
[1] 52 53
...
c1[1:2]
[[1]]
[1] 13 30 92 93 13 94 30 95 96 97 98 99
[13] 8 19 31 100
Wensui Liu liuwensui at gmail.com writes:
I know it is far off topic. But I do know there must be some people
here who know it very well.
Click the 'install now' button at cygwin.org, and when the selection box
appears in the install process, also select gcc. There is a _lot_ of stuff
You can use:
lines(x[!is.na[stu.vector], stu.vector[!is.na(stu.vector)], lty=1,
col='blue')
-Don
At 1:43 PM -0400 7/1/05, Doran, Harold wrote:
Dear List:
I am generating a series of plots iteratively using Sweave. In short, a
dataframe is subsetted row by row and variable graphics are
Hi R users.
I'm using the lattice library and I need a print version for my graphics.
How Set I my boxplot's lines to black
tpl-trellis.par.get(plot.line)
tpl$col-black
trellis.par.set(plot.line, tpl)
Don't work. Boxplot's lines aren't black.
Thanks a lot.
This is my script.
Dear R users,
I want to generate two random variables (X1, X2) from uniform
distribution (-0.5, 0.5) with a specified correlation coefficient r.
Does anyone know how to do it in R?
Many thanks!
Menghui
__
R-help@stat.math.ethz.ch mailing list
On 7/1/05, Mario Alfonso Morales Rivera [EMAIL PROTECTED] wrote:
Hi R users.
I'm using the lattice library and I need a print version for my graphics.
How Set I my boxplot's lines to black
(As I said in a private reply,) you seem to want a black and white plot, so use
dat-matrix(runif(2000),2,1000)
rho-.77
R-matrix(c(1,rho,rho,1),2,2)
dat2-t(ch)%*%dat
cor(dat2[1,],dat2[2,])
[1] 0.7513892
dat-matrix(runif(2),2,1)
rho-.28
R-matrix(c(1,rho,rho,1),2,2)
ch-chol(R)
dat2-t(ch)%*%dat
cor(dat2[1,],dat2[2,])
[1] 0.2681669
Isn't this a little trickier with non-normal variables? It sounds like
Menghui Chen wants variables that have uniform marginal distribution,
and a specified correlation.
When I look at histograms (or just the quantiles) of the rows of dat2 in
your example, I see something for dat2[2,] that
How about tetrachoric correlations? Generate correlated normal
observations, then convert to uniform using pnorm:
rho - 0.9
Cor - array(c(1, rho, rho, 1), dim=c(2,2))
library(mvtnorm)
set.seed(1)
Y - rmvnorm(1, sigma=Cor)
X - pnorm(Y)-0.5
plot(X)
hist(X[,1])
hist(X[,2])
cor(X)
Yes you are right I guess this works only for normal data. Free advice
sometimes comes with too little consideration :-)
Sorry about that and thanks to Spencer for the correct way.
-Original Message-
From: Tony Plate [mailto:[EMAIL PROTECTED]
Sent: July 1, 2005 6:01 PM
To: Jim Brennan
Cc:
Jim Brennan [EMAIL PROTECTED] writes:
Yes you are right I guess this works only for normal data. Free advice
sometimes comes with too little consideration :-)
Worth every cent...
Sorry about that and thanks to Spencer for the correct way.
Hmm, but is it? Or rather, what is the relation
Thanks a lot for help in advance. I am switching from matlab to R and I guess I
need some time to get rolling. I was wondering why this code :
fit.0 - lm( Response ~ 1, data = ds3)
step(fit.0,scope=list(upper=~.,lower=~1),data=ds3)
Start: AIC= -32.66
Response ~ 1
Call:
lm(formula =
OK now I am skeptical especially when you say in a weird way:-)
This may be OK but look at plot(x,y) and I am suspicious. Is it still
alright with this kind of relationship?
For large N it appears Spencer's method is returning slightly lower
correlation for the uniforms as compared to the normals
Peter is absolutely correct: The correlation I used was for a
hidden normal process, not for the resultant correlated uniforms. This
is similar to but different from tetrachoric corrrelations, about
which there is a substantial literature (including an R package
polycor).
Dear Menghui,
You may consider looking in Luc Devroye's Non-uniform Random Number
Generation. Despite its title, section XI.3.2 describes how to
generate bivariate uniforms. The book is out of print but Devroye
himself urges you to print it from his scanned PDFs(!):
I have a Date variable that I constructed with as.Date()
How ca I compare it to today (,,==) ?
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
The following is a minor modification of examples in the help for
as.Date:
x - c(1jan1960, 2jan1960, 31mar1960, 30jul2006)
z - as.Date(x, %d%b%Y)
z Sys.Date()
[1] TRUE TRUE TRUE FALSE
How's this?
spencer graves
Omar Lakkis wrote:
I have a Date variable
I have a very simple problem. When using glm to fit
binary logistic regression model, sometimes I receive
the following warning:
Warning messages:
1: fitted probabilities numerically 0 or 1 occurred
in: glm.fit(x = X, y = Y, weights = weights, start =
start, etastart = etastart,
2: fitted
A variation on your idea might be:
fo - stu.vector ~ x
lines(fo, model.frame(fo), lty=1, col='blue')
On 7/1/05, Don MacQueen [EMAIL PROTECTED] wrote:
You can use:
lines(x[!is.na[stu.vector], stu.vector[!is.na(stu.vector)], lty=1,
col='blue')
-Don
At 1:43 PM -0400 7/1/05, Doran,
The issue is not 30 observations but whether it is possible to
perfectly separate the two possible outcomes. Consider the following:
tst.glm - data.frame(x=1:3, y=c(0, 1, 0))
glm(y~x, family=binomial, data=tst.glm)
tst2.glm - data.frame(x=1:1000,
y=rep(0:1,
Please take the time to read this email. What you might view as spam could be
an animals last chance.
Animals don't stand a chance without the everyone's help. Some people don't
care, some don't think they can make a difference. There is always something
YOU can do to help.
We desperately
60 matches
Mail list logo