On Tue, Jan 25, 2011 at 08:58:31AM +, Prof Brian Ripley wrote:
[...]
If k may be 0, then it is better to use
for (n in seq(length=k))
since seq(length=0) has length 0.
Since you keep mentioning that, it is actually much better to use
seq_len(k) (and seq_along(x) instead of your
Hi,
I am trying to install gee on our server but I get the error below. I do not
have root on this machine so no control on how R was installed itself. It looks
like it cannot find blas libs, the only ones i can find on the machine are:
/usr/lib64/libblas.so.3 - libblas.so.3.0.3
There seems to be 2 functions call ecdf...
http://lib.stat.cmu.edu/S/Harrell/help/Hmisc/html/ecdf.html
http://127.0.0.1:11885/library/stats/html/ecdf.html
How do I get the one ecdf {Hmisc} to run instead of the ecdf {stats}
A pointer in the right direction would be greatly appreciated.
Hi:
It's in your message: :)
Hmisc:::ecdf(...)
indicates use of the ecdf function in package Hmisc.
HTH,
Dennis
On Wed, Jan 26, 2011 at 2:38 AM, pdb ph...@philbrierley.com wrote:
There seems to be 2 functions call ecdf...
http://lib.stat.cmu.edu/S/Harrell/help/Hmisc/html/ecdf.html
Hans W Borchers wrote :
First define a function from those points:
fx - approxfun(x, f_x)
fy - approxfun(y, f_y)
f - function(x) abs(fx(x)-fy(x))
and now you can apply integrate() or trapz():
xx - sort(c(x, y))
yy - f(xx)
trapz(xx, yy)
trapz() should
Thanks for the quick response, but that doesn't seem to help
What do I need to do to get it to work?
Hmisc:::ecdf(...)
Error in get(name, envir = asNamespace(pkg), inherits = FALSE) :
object 'ecdf' not found
--
View this message in context:
Note that a key is not actually required, so it's even simpler syntax :
dX = as.data.table(X)
dX[,length(unique(z)),by=x,y]
x y V1
[1,] 1 1 2
[2,] 1 2 2
[3,] 2 3 2
[4,] 2 4 2
[5,] 3 5 2
[6,] 3 6 2
or passing list() syntax to the 'by' is exactly the same :
The function in Hmisc is Ecdf():
u - rnorm(100)
Hmisc:::Ecdf(u)
D.
On Wed, Jan 26, 2011 at 2:58 AM, pdb ph...@philbrierley.com wrote:
Thanks for the quick response, but that doesn't seem to help
What do I need to do to get it to work?
Hmisc:::ecdf(...)
Error in get(name, envir =
Have you ever worked in R with bivariate polynomials? How did you implement
simple operators like addition/multiplication?
I found a package called multipol that seems to support these kinds of
operators but I do keep receiving error.
Check for example the following snippet of code (you can
This is nothing to do with gee (which I maintain). It seems what you
installed a binary version of R, and hence do not have the files it
refers to for source package installation. You appear to need to
install the blas-devel RPM.
Questions about binary installations of R are best asked on
Dear all,
I have a data frame 'myDf', in which one of the fields 'myField' can have
several possible values. To extract the observations for which it has value
A, I can do:
subset(myDf, myField=A)
However, when I try to do this within a loop, it doesn't work, it returns
everything, and not a
I have
df
quantity branch client date name
110 1 1 2010-01-01 one
220 2 1 2010-01-01 one
330 3 2 2010-01-01 two
415 4 1 2010-01-01 one
510 5 2 2010-01-01 two
620 6 3
I’m running a loop opening one file after another.
setwd(D:/Documents and Settings/trflp)
a-list.files()
results.diversity-data.frame(matrix(0,ncol=7,nrow=length(a)))
names(results.diversity)-c(file,simpson,shannon,eveness)
x-length(a)
for (i in 1:x){
trflp-read.table(a[i],header=T,sep=\t)
…
Dear all,
I need to generate plots in which the points of the plot are replaced
by text labels, such as dog and cat. The usual way of specifying
the plotting symbol with pch works only if the labels are single
characters, as far as I know. So,
plot(runif(3), pch=c(A, B, C))
will work OK, but
Hi,
I run Principal Component Regression (PCR) on my data and I got some
components.
Hoever, explvar(pcr.stdize) only shows the explained variation of each
component. How can I get the contribution of each factor in each component,
say 1st component?
For example, I have five variables and
Try this:
split(myDF, myDF$myField)
On Wed, Jan 26, 2011 at 8:18 AM, Aditya Bhagwat bhagwatadi...@gmail.comwrote:
Dear all,
I have a data frame 'myDf', in which one of the fields 'myField' can have
several possible values. To extract the observations for which it has value
A, I can do:
What I have understood in CARET train() method is that train() itself does
the model selection and tune the parameter. (please correct me if I am
wrong). That was my first motivation to select this package and method for
fitting the model. And use the parameter to e1071 svm() method and compare
Hello,
I have observed the following odd behavior of is.na( ) and hope someone
can give me an explanation
Example:
X1=rep(1:2,5)[-1]
X2=rep(1:5,rep(2,5))[-1]
y= runif(9)
y[3]=NA
xtabs(y~x1+x2)
Now
xtabs(is.na(y)~x1+x2) says that cell 2,2 is NA
x2
x1 1 2
1 0 0
2 0 1
3 0 0
4 0 0
5
New versions 2.3 of our distr-family of packages are now
available on CRAN.
(i.e.; startupmsg, SweaveListingUtils,
distr, distrEx, distrDoc,
If you have a large data frame, one option is package data.table. Try the
following:
library(data.table)
dt - data.table(df)
dt[, list(qsum = sum(quantity)), by ='client, date, name']
client date name qsum
[1,] 1 2010-01-01 one 45
[2,] 1 2011-01-01 one 4500
[3,] 2
There isn't combination of c(1, 1), so is NA:
tapply(y, list(X1, X2), sum)
On Wed, Jan 26, 2011 at 9:04 AM, René Holst r...@constat.dk wrote:
Hello,
I have observed the following odd behavior of is.na( ) and hope someone
can give me an explanation
Example:
X1=rep(1:2,5)[-1]
Dear R-users,
I used x.out=sign1(data,makeplot=TRUE) from the package mvoutlier to detect
multivariate outliers.
I would like to label the points in the resulting plot with the row names of
my data set. But none of my attempts does lead to a result. Can anybody help
me, please?
Try this:
unique(transform(df, quantity = ave(quantity, client, date, name, FUN =
sum), branch = NULL))
On Wed, Jan 26, 2011 at 8:39 AM, analys...@hotmail.com
analys...@hotmail.com wrote:
I have
df
quantity branch client date name
110 1 1 2010-01-01 one
2
Hi,
This isn't an issue with is.na, you get the same if you use
aa = c(1,1,0,1,1,1,1,1,1)
bb = abs(aa - 1)
xtabs(aa~x1+x2)
xtabs(bb~x1+x2)
it is because you do not have any data in (1,1), i.e. there is no case where x1
= 1 and x2 = 1 so xtabs is putting a zero in that cell
Hope this helps
On 11-01-25 8:22 PM, zerfetzen wrote:
Hi,
Is it possible in Sweave to put \Sexpr{} inside? This is a bad
example, but here goes:
results=hide
Age- 5
@
x- \Sexpr{Age}
@
I'm trying to get it to display x- 5, rather than x- Age. It's
probably
so obvious I'm going to feel sorry
On Jan 26, 2011, at 2:47 AM, Alaios wrote:
The reason is the following image
http://img545.imageshack.us/i/maptoregion.jpg/
In the picture above you will find the indexes for each cell.
Also you will see that I place that matrix inside a x,y region that
spans from -1 to 1. I am trying to
Hello everybody,
i need some help to display text as label in my barchart
the label is the combination of x value + text
text= calculated percentage = per
it display properly the x value
but, wrongly repeats the text of the fisrt level LangueTXT factor on the
second
any solution?
Thanx very much
On Jan 26, 2011, at 5:38 AM, pdb wrote:
There seems to be 2 functions call ecdf...
http://lib.stat.cmu.edu/S/Harrell/help/Hmisc/html/ecdf.html
Apparently that used to be its name and that some time in the
intervening 10 years the name was changed to Ecdf. The Statlib
repository has
I would look into ggplot2. I use this quite frequently to do what you
are talking about, and also for most of my plotting. Hadley has done
a wonderful job with this package.
kindest regards,
Stephen
On Jan 26, 2011, at 3:48 AM, Claudia Paladini wrote:
Dear R-users,
I used
Hello all and thanks for the help.
I am analyzing a dataset using MetaMDS and I would like to project some
extra samples onto the plot such that the extra samples do not play a role
in defining the axes. I have been thinking of different ways of doing this
and I was wondering if anyone had a
Dear all,
My apologies for re-posting this question, but I have not found any
solution to my problem so far. I also think that my post may have been
overseen due to the posting time and high traffic on this list.
I experience a problem in implementing a S4 class in a package and would
On Wed, Jan 26, 2011 at 5:27 AM, Dennis Murphy djmu...@gmail.com wrote:
Hi:
Here are two more candidates, using the plyr and data.table packages:
library(plyr)
ddply(X, .(x, y), function(d) length(unique(d$z)))
x y V1
1 1 1 2
2 1 2 2
3 2 3 2
4 2 4 2
5 3 5 2
6 3 6 2
The
Hello Prof Brian Ripley, Yihui and Tom,
Thank you for your suggestions. It seemed to have made some differences in
the error massages - but rggobi still fails to load.
Steps taken:
1) I removed the old GTK (through the uninstall interface)
2) I ran library(RGtk2) which downloaded the new
Begin forwarded message:
From: David Winsemius dwinsem...@comcast.net
Date: January 26, 2011 8:32:30 AM EST
To: Alaios ala...@yahoo.com
Subject: Re: [R] MAtrix addressing
On Jan 26, 2011, at 7:58 AM, Alaios wrote:
Unfortunately right now is convoluted... by I was trying to find
some
On 01/26/2011 05:08 AM, Pascal A. Niklaus wrote:
Dear all,
My apologies for re-posting this question, but I have not found any
solution to my problem so far. I also think that my post may have been
overseen due to the posting time and high traffic on this list.
I experience a problem in
acocac acocac at gmail.com writes:
Hi!! Im doing my graduated work in Onion Curves Growth with Nonlinear Models,
I'm amateur in R so i have doubt how i put or program next models,
http://r.789695.n4.nabble.com/file/n3236748/96629508.png
Also, i cant derivate for Gauss Model, and
Sort of. It lets you define a grid of candidate values to test and to
define the rule to choose the best. For some models, it is each to
come up with default values that work well (e.g. RBF SVM's, PLS, KNN)
while others are more data dependent. In the latter case, the defaults
may not work well.
Your GTK+ installation is not being found: check your PATH.
On Wed, 26 Jan 2011, Tal Galili wrote:
Hello Prof Brian Ripley, Yihui and Tom,
Thank you for your suggestions. It seemed to have made some differences in
the error massages - but rggobi still fails to load.
Steps taken:
1) I
you were caught by the '=' versus '==' error ;-)
and Henrique's elegant one-liner avoids the problem altogether.
-- David
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Henrique Dallazuanna
Sent: Wednesday, January 26, 2011 6:00
--- begin inclusion ---
Response variable: survival (death)
Factor 1: treatment (4 levels)
Factor 2: sex (male / female)
Random effects 1: person nested within day (2 people did the
experiment over 2 days)
Random effects 2:
Good morning,
This problem was already addressed in a previous post:
https://stat.ethz.ch/pipermail/r-help/2009-February/187244.html
In the call to draw.key() use
'vp=viewport(x=unit(0.1,npc),y=unit(0.1,npc))'.
Prior to calling viewport() make sure grid package is loaded.
Apologies for
I checked it using:
Sys.getenv(PATH)
And the output includes the PATH to the GTK2 installation (it's the last
item in the following list):
C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program
Files (x86)\\Common Files\\Ulead
Thank you so much for your reply. In my case it is giving error in some seed
value for example if I set seed value to 357 this gives an error. Does train
have some specific seed range?
--
View this message in context:
Hi Larry,
If I understand correctly, your barplot() call dispatches to the
method function barplot.default() to do the work. Looking at the
definition of that function and your specific call, it seems that
around line 51 of barplot.default(), the value of the width argument
is truncated:
width
Why do you need the line to overlay the bars? Which bars are touched by the
line is just a quirk of scaling and could easily change with the scales. All
the overlay does is to make it harder to read, why not jut have 2 panels
aligned on the x-axis but with the line plot above the bar plot?
Hello there,
Straight to the point: it seems that CairoPDF from package Cairo
cannot handle greek letters from expression(). For example,
eta = seq(from=-pi, to=pi, length=100)
f = sin(eta)^2
pdf(file = temp_pdf.pdf)
plot(eta, f, type=l, main=expression(f(eta)==sin(eta)^2),
I am using:
R version 2.11.1 (2010-05-31)
It is good to know that it works in 2.12.1
Jim
-Original Message-
From: Peter Ehlers [mailto:ehl...@ucalgary.ca]
Sent: Tuesday, January 25, 2011 5:57 PM
To: Jim Moon
Cc: r-help@r-project.org
Subject: Re: [R] write.table -- maintain decimal
Great. Thank you, Peter!
-Original Message-
From: Peter Ehlers [mailto:ehl...@ucalgary.ca]
Sent: Tuesday, January 25, 2011 7:26 PM
To: Jim Moon
Cc: r-help@r-project.org
Subject: Re: [R] write.table -- maintain decimal places
On 2011-01-25 17:22, Jim Moon wrote:
Thank you for the
Hadley and Dennis:
THANK YOU THANK YOU! This is exactly what I was looking for.
Ryan
On Wed, Jan 26, 2011 at 5:27 AM, Dennis Murphy djmu...@gmail.com wrote:
Hi:
Here are two more candidates, using the plyr and data.table packages:
library(plyr)
ddply(X, .(x, y), function(d)
Dear R-folks:
I have a group of data ('x' and 'y' axis), but I'd like to know how to draw a
graph which would fits my data in a better way, I also need its equation. Could
you give me any R-rutine ideas?.
I thank you in advance for your kind support.
I hope this is what you are looking for. you will have to add your own colors
and such.
year = c(1966:2008)
tempur =
c(2.9,4.5,1.9,1,2.9,4.3,3.9,4.3,4.9,4.4,4.5,2,2.8,-.4,2.3,3,.3,1.7,3.3,.8,-1.1,.8,4.9,5.2,4.9,1.5,3.7,3.6,3.2,4.8,2.3,2.5,5.2,5.3,4.9,3.2,3.6,3.9,4.8,4.3,3.7,5.8,4.9)
indx =
Hello,
I have some question on chron
I currently doing this
t1 - chron(,11:30:00)
t2 - chron(,11:45:00)
tt - seq(t1,t2,by=times(00:00:01))
tt has 901 values (15 minutes * 60 secs) and then
x1 - rnorm(1:901)
x2 - rnorm(1:901)
x3 - rnorm(1:901)
df - data.frame(tt, x1, x2, x3)
I would like
Hi,
I have a few lines of code that will remove outliers for a regression test
based on the studentized residuals being above or below 3, -3. I have to do
this multiple times and have attempted to create a function to lessen the
amount of copying, pasting and replacing.
I run into trouble with
Although I saw this issue being discussed many times before, I still
did not find the answer to:
why does R can not calculate p-values for data with ties (i.e. -
sample with two or more values the same)?
Can anyone elaborate some details about how does R calculate the p-
values for the
Hi All,
I am trying to combine two forest plots on the same page using the forestplot
function in the rmeta package. Once I use the par() function to combine my
plots on the same page, I find that my two plots are overlaying each other.
Does anyone have any suggestions on how to fix this?
Hello all,
I wish to extract the terms from an rpart object.
Specifically, I would like to be able to know what is the response variable
(so I could do some manipulation on it).
But in general, such a method for rpart will also need to handle a . case
(see fit2)
Here are two simple examples:
Hello all,
I'm was going through the help for
?rpart.object
And noticed some inconsistencies, Some might be a mistake in the help file
and some might be my misunderstanding.
The help in the section:
value - frame (first paragraph), states that:
yval, the fitted value of the response at each
The answers to these questions can be found either by looking at the
code or by reviewing what has been said about this in prior postings
to R-help.
--
David.
On Jan 26, 2011, at 10:40 AM, saray wrote:
Although I saw this issue being discussed many times before, I still
did not find the
Take a look at the output of
terms(fit2)
In particular
tm - terms(fit2)
attr(tm, response)
is 1 if there is a response and
variables - as.list(attr(tm, variables))[-1]
variables[[1]]
gives the response expression if there is one.
Bill Dunlap
Spotfire, TIBCO Software
wdunlap
Try this:
all.vars(terms(fit1))
all.vars(terms(fit2))
On Wed, Jan 26, 2011 at 3:33 PM, Tal Galili tal.gal...@gmail.com wrote:
Hello all,
I wish to extract the terms from an rpart object.
Specifically, I would like to be able to know what is the response variable
(so I could do some
Hi,
x and y are being picked up from your global environment, not from the
x and y in dataset. Here is a version that seems to work:
rm.outliers = function(dataset,var1, var2) {
dataset$varpredicted = predict(lm(as.formula(paste(var1, var2,
sep= ~ )), data=dataset))
dataset$varstdres =
Thanks Henrique, exactly what I was looking for.
Contact
Details:---
Contact me: tal.gal...@gmail.com | 972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
No. Any valid seed should work. In this case, train() should on;y be
using it to determine which training set samples are in the CV or
bootstrap data sets.
Max
On Wed, Jan 26, 2011 at 9:56 AM, Neeti nikkiha...@gmail.com wrote:
Thank you so much for your reply. In my case it is giving error in
Another (similar) question,
If I now want to know the name of the data argument used, is there an easy
way for me to access it?
I'm trying to use something like:
eval(parse(text = all.vars(terms(fit1))[1]))
Which (of course) wouldn't work, since the response variable is only
available in the
Dear all,
I am trying to add error bars on a boxplot but have encountered an error as
indicated below. Is there a package I need to install or a library I have to
load before this goes please.
Thanks for any idea.
Ogbos
x-replicate(20,rnorm(50))
boxplot(x,notch=TRUE,main=Notched boxplot with
Note that all.vars(terms(fit)) only looks at the
formula in the terms object and throws away all
the analysis done by rpart's call to terms(formula,data).
Here is a contrived example of that approach failing:
ageThreshold - 50
fit3 - rpart(Kyphosis==present ~ (AgeageThreshold) + log(Number,
Hi,
You will find package sos has some handy functions for searching for
functions/packages:
###
install.packages(sos)
require(sos)
findFn(error.bars)
###
Perhaps the psych package has the error.bars() function you are thinking of?
As a side
;^)
you're right: we'll add it soon. Keep an eye on R-forge.
All the best,
Giovanni
-- original message
Message: 89
Date: Tue, 25 Jan 2011 17:14:00 -0800 (PST)
From: zhaowei zao_...@msn.com
To: r-help@r-project.org
Subject: Re: [R] how to get loglik parameter from
Harrell's wiki/website has material on so-called dynamite plots
http://biostat.mc.vanderbilt.edu/twiki/bin/view/Main/DynamitePlots
Ben Bolker has a page on them as well:
http://emdbolker.wikidot.com/blog:dynamite
--
David.
On Jan 26, 2011, at 1:26 PM, Joshua Wiley wrote:
Hi,
You will
Hello All.
I am using the image2 plot function in the popbio package to create 6
elasticity analyses. I am trying to reduce the number of significant digits
that displays -- from 3 digits to 2. I tried rounding my original matrices,
but one is comprised primarily of zeros, and the cut / breaks
Try this:
as.character(as.list(fit1$call)$data)
On Wed, Jan 26, 2011 at 4:12 PM, Tal Galili tal.gal...@gmail.com wrote:
Another (similar) question,
If I now want to know the name of the data argument used, is there an
easy way for me to access it?
I'm trying to use something like:
Hi all,
I am using a discrete Hidden Markov Model with discrete observations in
order to detect a sequence of integers. I am using the hmm.discnp package.
I am using the following code:
signature - c(-89, -98, -90, -84, -77, -75, -64, -60, -58, -55, -56, -57,
-57, -63, -77, -81, -82, -91, -85,
Exactly what I needed Henrique,
Thank you.
Contact
Details:---
Contact me: tal.gal...@gmail.com | 972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
I would leave off the as.character(). With it you get
things like:
f - rpart(Kyphosis ~ ., kyphosis[-3])
as.list(f$call)$data
kyphosis[-3]
as.character(as.list(f$call)$data)
[1] [kyphosis -3
Expressions like quote(kyphosis[-3]) are much
easier to analyze as expressions that
Hello ;
How could I choose subvector of a vctor. for example if v=c(1,2,5,0,1), how
could I chose the (1,2) or (1,2,5).
thanks;
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
Hi,
I am relatively new to R and have a question regarding code. I have a data set
which has data organised by location (site names, which are factors). I now
want to add a new variable Region (this will be non numerical, as it will be
names). Each region will contain locations. So for
On Jan 26, 2011, at 2:42 PM, Akram Khaleghei Ghosheh balagh wrote:
Hello ;
How could I choose subvector of a vctor. for example if
v=c(1,2,5,0,1), how
could I chose the (1,2) or (1,2,5).
?[
v[ c(1,2,5) ]
thanks;
[[alternative HTML version deleted]]
On Jan 26, 2011, at 2:06 PM, Melanie Zoelck wrote:
Hi,
I am relatively new to R and have a question regarding code. I have
a data set which has data organised by location (site names, which
are factors). I now want to add a new variable Region (this will be
non numerical, as it will be
On Jan 26, 2011, at 2:48 PM, David Winsemius wrote:
On Jan 26, 2011, at 2:42 PM, Akram Khaleghei Ghosheh balagh wrote:
Hello ;
How could I choose subvector of a vctor. for example if
v=c(1,2,5,0,1), how
could I chose the (1,2) or (1,2,5).
?[
v[ c(1,2,5) ]
I didn't notice at first
All,
I would like to apply a set of rules to each row of the sample data set
below. The rule sets are the guidelines for determining an individual's
date for retirement eligibility. The rules are found in this document,
http://www.opm.gov/feddata/RetirementPaperFinal_v4.pdf. I am only
interested
Surprising behavior:
Most R users are aware that print()
must be used inside functions to gain
output on the console.
Apparently, print() is sometimes required
when interactively using the console.
For example, the followingmay be
entered into the R console with different results.
sample(1:8,8)
If I understand you correctly, you want ?ifelse, which works on the
full logical vectors of rules applied to the variables, not
ifelse, which works on only a single logical.
-- Bert Gunter
On Wed, Jan 26, 2011 at 12:18 PM, KATSCHKE, ADRIAN CIV DFAS
adrian.katsc...@dfas.mil wrote:
All,
I
On 26/01/2011 3:27 PM, Giles Crane wrote:
Surprising behavior:
Most R users are aware that print()
must be used inside functions to gain
output on the console.
Apparently, print() is sometimes required
when interactively using the console.
For example, the followingmay be
entered into the R
Yes. That is exactly what I would like to have running. Here is the first
attempt I made at using a nested ?ifelse statement for one of the retirement
plans. The variables are all there but with different names. ageYOSstart is
ageFedStart, SCDCivLeave is srvCompDT. I haven't gotten this
I remember something about the degree of nesting of ifelse calls being
limited to 7 deep (???) that makes me worry about this approach. You
may want to look at the arules package or the data.table package or
the sqldf package for approaches that are specifically constructed
with this sort
Thanks Dennis this is what I was looking for.
On Wed, Jan 26, 2011 at 4:14 AM, Dennis Murphy djmu...@gmail.com wrote:
Hi:
Here's one approach:
f - function(df) {
rs - with(na.exclude(df), tapply(y, strata, sum)/tapply(x, strata,
sum))
u - transform(subset(df, is.na(y)), y = x
Dear R-helpers,
I can not invoke maxent() in Mac OSX. Could you give me any directions
on that? Thank you in advance.
Here is my info:
# (1) the error
me - maxent(predictors, occtrain, factors='biome')
me - maxent(predictors, occtrain, factors='biome')
Error in .jcall(mxe, S, fit, c(autorun,
... or perhaps just break things up with assignments and do it in stages.
-- Bert
On Wed, Jan 26, 2011 at 12:52 PM, David Winsemius
dwinsem...@comcast.net wrote:
I remember something about the degree of nesting of ifelse calls being
limited to 7 deep (???) that makes me worry about this
Thanks Duncan, that helps. It successfully displays what I'm looking for,
but it is not executing it. In a previous code chunk, it notes the time it
took to run something, and in the successive code chunk, it runs something
else where the previous time is now a parameter, but I'd like it to
Dear colleagues, I have the following dataset. It is modelled on the data
included in Box-Seteffenheiser and Jones Event History Modelling
Using the following code, I try to find the baseline hazard function
haz_1-muhaz(bpa$time, bpa$censored, subset=(bpa$year==2010 | bpa$ban==1),
min.time=1,
Dear useRs,
This is to announce the RGtk2Extras R package is available on CRAN in version
0.5.1.
This package provides useful extras for R programmers who wish to create
graphic user interfaces. It is based on GTK, using Michael Lawrence's RGtk2
package and John Verzani's gWidgets, and some
On 11-01-26 3:43 PM, zerfetzen wrote:
Thanks Duncan, that helps. It successfully displays what I'm looking for,
but it is not executing it. In a previous code chunk, it notes the time it
took to run something, and in the successive code chunk, it runs something
else where the previous time is
Your faith in our ability to read your mind is apparently much higher than our
actual ability to do so. What is the nature of your data? what question are
you trying to answer? What type of equation do you want? What do you mean by
better? Better than what?
Maybe the esp package (pre-alpha)
I am having trouble with variable scoping inside/outside functions. I
want to use get() to grab a named and quoted variable as an input to a
function, however the function can't find the variable when it is entered
into the function call, only when it is named in the main environment.
I
It's looking for an object named b in the frame of the function.
There is none. You need to specify
get(response, pos = parent.frame())
## or maybe even
get(response, pos= globalenv())
HOWEVER, this is **exactly** why you shouldn't do this! Instead of
passing in the name of the object, pass in
Hello all,
I wrote a small function to add labels for outliers in a boxplot.
This function will only work on a simple boxplot/formula command (e.g:
something like boxplot(y~x)).
Code + example follows in this e-mail.
I'd be happy for any suggestions on how to improve this code, for example:
For the last point (cluttered text), look at spread.labels in the plotrix
package and spread.labs in the TeachingDemos package (I favor the later, but
could be slightly biased as well). Doing more than what those 2 functions do
becomes really complicated really fast.
--
Gregory (Greg) L.
Not sure exactly what you mean by, writing a table with several rows per
file.
If what you want to do is write output to an external file, adding to it as
your loop progresses, then look at the functions
sink()
cat()
And their file and append arguments.
If what you want to do is
Hello,
I have this code to plot a certain normal distribution and represent the pnorm
value for a certain x:
x-300
xx - seq(2.5,7.5, by=0.1)
yy - dnorm(xx,5.01,0.77)
d-signif(pnorm(log(x), 5.01,0.77),4)
xpts - round(exp(0:8))
par(bg = antiquewhite)
plot(xx,yy, type=l, col=blue, lwd=2, xaxt=n,
Hi all,
I have a factor array, and some of the elements are empty. How would I
return the index number of the empty elements. For example,
test-factor(c('A','','B','C','E'))
test
[1] A B C E
Levels: A B C E
I would like the result equal to 2.
Thank you,
Wendy
--
View this message in
1 - 100 of 119 matches
Mail list logo