On 12/18/2009 06:42 AM, changzhu wrote:
I wanted to do a simple plot: Death Rate vs Clinical Site, and then draw a
confidence interval of Death Rate at each clinical site, which is a factor
variable with 100 levels. I used the following code:
plot(Site, Rate, col="red", type="o")
However, the g
On Thu, Dec 17, 2009 at 4:33 PM, Peng Yu wrote:
> On Thu, Dec 17, 2009 at 5:33 AM, Gustaf Rydevik
> wrote:
>> On Wed, Dec 16, 2009 at 10:13 PM, Peng Yu wrote:
>>>
>>> Currently, I load the RData file then ls() and str(). But loading the file
>>> takes too long if the file is big. Most of the tim
Could you please supply with a reproducible self sufficient script ?
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
On Thu, 17-Dec-2009 at 03:13PM +1800, Peng Yu wrote:
|> Currently, I load the RData file then ls() and str(). But loading the file
|> takes too long if the file is big. Most of the time, I only interested what
|> the variables are in the the file and the attributes of the variables (like
|> if it
Hi All,
I couldn't resist doing this the "right" way!
A colleague explained the vector algebra to me (thanks Martin!) and I've
followed the structure of the Matlab code referenced below, but all errors
are mine!
I don't pretend to great R expertise, so this code may not be optimal (in
time or
Hi, your question is unclear. It is not clear whether you want to compare
a.) whether two subsets of data have the same coefficients for an identical
model or b.) whether a couple of coefficients are different once you include
additional regressors. The reason for this confusion is that your
lm.sep
Hi,
Excellent, thanks for doing this!
I had tried the 2D case myself but I was put off by the fact that
Octave's convhulln had a different ordering of the points to R's
geometry package (an improvement to Octave's convhulln was made after
it was ported to R). I'm not sure how you got around this
Read the troubleshooting section on the home page:
http://ryacas.googlecode.com . Some common problems are that you did
not install yacas itself (issue yacasInstall() command without args
and it will do that for you) and that you are using the wrong version
of the XML package.
> library(Ryacas)
L
Hi thanks.
Another question...
When R prints the regression output onto the screen after i perform my
regression:
output_dat <- lm(
results <- summary(output_dat)
results
How do i print the regression output to a file for inclusion into a
document.
I tried: cat(summary(output_dat), fil
On 17/12/2009 11:08 PM, S Ellison wrote:
I'm writing a package, and would appreciate advice on controlling the
help documentation cross-references for a redefined generic.
I wanted to define a cbind equivalent for an object that mostly behaves
like a data frame. base::cbind dispatches to a data
Hi,
I'm having some troubles in using the ADE-4 package. I want to analyze data
for the Outlying Mean Index in the function 'niche'. I've got two matrixes:
one for environmental data and the other for species abundance data. But to
implement the analysis, as I understand it, I need to put tocheger
S Ellison lgc.co.uk> writes:
> I wanted to define a cbind equivalent for an object that mostly behaves
> like a data frame. base::cbind dispatches to a data frame method if
> _any_ parameter is a data frame, so I defined a new S3 cbind and
> cbind.default to handle dispatch on first object only. T
Use write.table instead.
On Thu, Dec 17, 2009 at 6:52 PM, kayj wrote:
>
> Hi All,
>
> I always have a problem with write.csv when I want the column names to be
> ignored, when I specify col.names=F, I get a header of V1 V2 V3 V4 etc.
>
> for example I tried
>
> write.csv(mydata, file="data.csv",
On Wed, Dec 9, 2009 at 10:08 AM, Cable, Samuel B Civ USAF AFMC
AFRL/RVBXI wrote:
> Thanks, all, for the help. Much obliged. I realize now that I should
> have said that I am using lattice graphics. The par() command has not
> been helpful in convincing lattice to plot outside of the default
> w
Hello
I was trying to estimate the weibull model using nls after putting OLS
values as the initial inputs to NLS.
I tried multiple times but still i m getting the same error of Error in
nlsModel(formula, mf, start, wts) :
singular gradient matrix at initial parameter estimates.
The Program is a
Hi,
I was wondering if there is a way to adjust the shape of the box around the
wireframe. By default this box is always a cube. For instance, is it
possible to cut this cube into two halfs each half being a 3d rectangle? Or
just plot a 3d rectangle with a wireframe inside and adjusted axes?
So f
On Dec 18, 2009, at 2:57 AM, Jim Lemon wrote:
On 12/18/2009 06:35 AM, Doug Hill wrote:
Hi, all. I'm using hist() to obtain a vector of break values in an
interval.
I then want to be able to identify which cell any value from
another vector
falls in.
E.g. applying
breaks
[1] -3.5 -3.
On Fri, Dec 18, 2009 at 5:19 AM, Thomas Roth
wrote:
> Hi,
>
> I was wondering if there is a way to adjust the shape of the box around the
> wireframe. By default this box is always a cube. For instance, is it
> possible to cut this cube into two halfs each half being a 3d rectangle? Or
> just plot
On Dec 17, 2009, at 5:14 PM, Clara Yuan wrote:
Hello,
(Also, why are the coefficients renamed to t.L, t.Q, etc instead of
t.1, t.2?)
You have coded your t variable as an ordered factor.
?ordered
if you do not want the linear, quadratic, cubic coefficients for the
polynomial contra
On Dec 18, 2009, at 6:34 AM, DispersionMap wrote:
Hi thanks.
Another question...
When R prints the regression output onto the screen after i perform my
regression:
output_dat <- lm(
results <- summary(output_dat)
results
How do i print the regression output to a file for inclusion int
On Fri, Dec 18, 2009 at 7:52 AM, kayj wrote:
>
> Hi All,
>
> I always have a problem with write.csv when I want the column names to be
> ignored, when I specify col.names=F, I get a header of V1 V2 V3 V4 etc.
>
I tried that and found the same problem, however, I found
write.table(mydata, file="
Hi,
Thank you for the quick answer...
I made a small example:
require(lattice)
x = 1:100
x = numeric(0)
z = numeric(0)
y = numeric(0)
for(i in 1:100)
{
y = c(y,1:i)
x = c(x, rep(i,i))
z = x + y
}
#omitted bounding box
wireframe(z ~ x*y, par.box = c(col = "transparent"))
#needed: rectang
In your function, you have
temp <- read.table(fnames,header=T,sep="\t",stringsAsFactors=F,quote="\"")
I think you mean:
temp <- read.table(i,header=T,sep="\t",stringsAsFactors=F,quote="\"")
Also 'files' is a parameter, but you are using 'fnames' in the 'for' loop;
shouldn't that be 'files'?
On Dec 18, 2009, at 6:49 AM, Diogo B. Provete wrote:
Hi,
I'm having some troubles in using the ADE-4 package. I want to
analyze data
for the Outlying Mean Index in the function 'niche'. I've got two
matrixes:
one for environmental data and the other for species abundance data.
But to
impl
You will most likely need to drop the samples that are causing the NA
values from both of your datasets. The function won't work with NA values.
Sarah
On Thu, Dec 17, 2009 at 12:33 PM, marciarocha wrote:
>
> Dear R users,
>
> I am having a problem performing the mantel test (both with functions
In R.2.9.2 I get the following error message if setting col.names=FALSE:
> write.csv(x, '', col.names=FALSE)
"","a","b"
"1",1,1
"2",2,2
"3",3,3
"4",4,4
"5",5,5
"6",6,6
"7",7,7
"8",8,8
"9",9,9
"10",10,10
Warning message:
In write.csv(x, "", col.names = FALSE) : attempt to set 'col.names' ignored
Yo
On Dec 18, 2009, at 8:52 AM, Thomas Roth wrote:
Hi,
Thank you for the quick answer...
I made a small example:
require(lattice)
x = 1:100
x = numeric(0)
z = numeric(0)
y = numeric(0)
for(i in 1:100)
{
y = c(y,1:i)
x = c(x, rep(i,i))
z = x + y
}
#omitted bounding box
wireframe(z ~ x*y, par
Just in case anyone ever has similar issues, it appears that 'glht' does not
work without an intercept.
--
View this message in context:
http://n4.nabble.com/error-when-using-multcomp-and-lm-tp964705p974823.html
Sent from the R help mailing list archive at Nabble.com.
Sorry,
I mixed up some words...
I wrote rectangle but meant TRIANGLE, sorry for that.
As for the book, I own it, studied it as well as the help pages but didn't
come to a conclusion for my problem. Aspect can't help me with my problem. I
need to set up the axes and obviously make some transform
Dear @ll. I have to calculate numerical integrals for triangular and
trapezoidal figures. I know you can calculate the exactly, but I want to do it
this way to learn how to proceed with more complicated shapes. The code I'm
using is the following:
integrand<-function(x) {
print(x)
if(x=fx
Syntax suggestions implemented.
Inhull's original author consulted.
Function submitted for potential inclusion in geometry package.
Seasons greetings to all.
Keith Jewell
-
"baptiste auguie" wrote in message
news:de4e29f50912180238m45c4b7c3g792113d5b6c4c...@mail.
Hi everybody,
I'm trying to construct contrasts for an ANOVA to determine if there is a
significant trend in the means of my groups.
In the following example, based on the type of 2x3 ANOVA I'm trying to perform,
does the linear polynomial contrast generated by contr.poly allow me to test
for
Dear R community
I try to create a new operator to build a special sum of two CashFlows. (my
S4 Class)
I tried the following but this is actually not what I want.
setGeneric("++",function(e1,e2)standardGeneric("++"))
setMethod("+",signature=list("CashFlow","CashFlow"),function(e1,e2){
print("
On Sat, Dec 19, 2009 at 3:35 AM, Patrick Connolly
wrote:
> On Thu, 17-Dec-2009 at 03:13PM +1800, Peng Yu wrote:
>
> |> Currently, I load the RData file then ls() and str(). But loading the file
> |> takes too long if the file is big. Most of the time, I only interested what
> |> the variables are
Hi,
To save the output to a text file you can use
sink(file="results.txt")
summary(output_dat)
sink()
See ?sink for details.
To output to a table, you can use xtable or Hmisc::latex.
-Ista
On Fri, Dec 18, 2009 at 6:34 AM, DispersionMap wrote:
>
>
> Hi thanks.
>
> Another question...
>
> When R
On 18/12/2009 10:22 AM, berga...@gmail.com wrote:
Dear R community
I try to create a new operator to build a special sum of two CashFlows. (my
S4 Class)
I tried the following but this is actually not what I want.
setGeneric("++",function(e1,e2)standardGeneric("++"))
setMethod("+",signature
On Dec 18, 2009, at 10:02 AM, Thomas Roth wrote:
Sorry,
I mixed up some words...
I wrote rectangle but meant TRIANGLE, sorry for that.
Huh? You want a triangular bounding box? We are supposed to fill in
the rest of the details, ... how?
As for the book, I own it, studied it as well as
ruchita gupta gmail.com> writes:
>
> Hello
>
> I was trying to estimate the weibull model using nls after putting OLS
> values as the initial inputs to NLS.
> I tried multiple times but still i m getting the same error of Error in
> nlsModel(formula, mf, start, wts) :
> singular gradient matr
Dear Colm,
Use lm() instead of aov() and your problem is solved. The parameter of Group.L
is the linear trend along your groups. Group.Q the quandratic trend.
HTH,
Thierry
summary(lm(Mean_1 ~ Group*eventType, data=doi))
Call:
lm(formula = Mean_1 ~ Group * eventType, data = doi)
Residuals:
On Fri, 18 Dec 2009, Achim Zeileis wrote:
On Fri, 18 Dec 2009, chrischizinski wrote:
Just in case anyone ever has similar issues, it appears that 'glht' does
not work without an intercept.
That is not precise enough to be useful. I've had a look again and appears to
be the case that mcp()
At 9:37 PM +0800 12/18/09,
=?UTF-8?B?UmVleWFybl/mnY7mmbrmtItfMTA5MjgxMTM=?= wrote:
On Fri, Dec 18, 2009 at 7:52 AM, kayj wrote:
Hi All,
I always have a problem with write.csv when I want the column names to be
ignored, when I specify col.names=F, I get a header of V1 V2 V3 V4 etc.
I tri
However, source code is available at
http://water.usgs.gov/nrp/gwsoftware/modflow2005/modflow2005.html
so it would seem that the details are available.
-Don
At 4:35 PM -0500 12/17/09, kapo coulibaly wrote:
Duncan,
I couldn't find clear details about the way fortran writes the binaries. I
was
Hello,
I am trying, and failing, to do the birats example from the WinBugs manual
with R2Winbugs.
I can manage the rats example OK. Also, I can manage birats in WinBugs.
Here is the code I am running, the .bug program, and the error message. Any
help would be gratefully received.
Thank you,
Mi
> We are using frailty models to estimate risk of one year death. Is
> there a way to generate survival curves adjusted for covariates and
> also include frailty term?
I don't know how to do this as yet -- so it's not in the survival
package. (On my list of things to think hard about; I'd like
Dear R users,
I am new to R and I couldn't figure out how to solve the following
problem:
I am trying to put a legend below two plots using the code below. The
legend appears in the second plot,
but I want the legend to appear below the two plots in the center of
the total chart. At the moment th
Thanks a lot William. I'm sorry about the syntax problem. I was working at the
same time with R code and a document, so I copied from the wrong document.
I saw that I had a problem with the conditions of the integrand. A ">" instead
of a ">=" on the second one. Again, thanks.
One last question:
Hi all,
I just noticed (the hard way of course) that when a query returns 0
rows, the columns in the resulting data.frame get dropped as well. See
the following example code (where conn is an active connection to an
SQLite db):
> dbGetQuery(conn, "select 1 as hey, 2 as ho where 1")
hey ho
Suppose that I 'library()' a package, in the 'NAMESPACE' file of the
package, it export some functions to the global namespace. Is there a
way to 'library()' the package without export the functions in
'NAMESPACE' to the global namespace?
__
R-help@r-pro
> -Original Message-
> From: Julio Rojas [mailto:jcredbe...@ymail.com]
> Sent: Friday, December 18, 2009 9:06 AM
> To: William Dunlap; r-help@r-project.org
> Subject: RE: [R] Numerical Integration
>
> Thanks a lot William. I'm sorry about the syntax problem. I
> was working at the same t
On Fri, 18 Dec 2009, chrischizinski wrote:
Just in case anyone ever has similar issues, it appears that 'glht' does
not work without an intercept.
That is not precise enough to be useful. I've had a look again and appears
to be the case that mcp() (or rather the internal function mcp2matrix)
Thanks for suggesting data.table. It does have advantages in this example
but it has to be used in a particular way.
What does Peng actually want to achieve? I'll guess (but its only a guess)
that he doesn't actually need to hold the entire table in memory in a split
up format before doing so
Hi Daniel,
Thanks for your thorough response. You are indeed correct that I was looking
for (a), and the Chow test fits the bill exactly. However, I believe my method
is equivalent to the Chow test. Rather than summing the errors across
regressions on different datasets, I formulate a single sp
Thanks, guys! Doug
David Winsemius wrote:
>
>
> On Dec 18, 2009, at 2:57 AM, Jim Lemon wrote:
>
>> On 12/18/2009 06:35 AM, Doug Hill wrote:
>>> Hi, all. I'm using hist() to obtain a vector of break values in an
>>> interval.
>>> I then want to be able to identify which cell any value from
as known, svm need tune some parameters like cost,gamma and epsilon to get
better performance,but one question appear, how can i monitor the
performance . generally speaking ,we chose the cross-validation MSE in the
training set, but It seems svm can not return the cross-validation MSE
value, we
On Fri, Dec 18, 2009 at 3:33 AM, Gustaf Rydevik
wrote:
> On Thu, Dec 17, 2009 at 4:33 PM, Peng Yu wrote:
>> On Thu, Dec 17, 2009 at 5:33 AM, Gustaf Rydevik
>> wrote:
>>> On Wed, Dec 16, 2009 at 10:13 PM, Peng Yu wrote:
Currently, I load the RData file then ls() and str(). But loading
This only uses 2 parameters instead of 3 and gives quite a good fit:
> DF <- structure(list(conc = c(0.077, 0.328, 0.882, 1.195, 1.884, 3.577,
+ 6.549, 13, 33.69, 52.22, 90.14, 166.05, 233.62, 346.89), vel =
1:14), .Names = c("conc",
+ "vel"), class = "data.frame", row.names = c(NA, -14L))
>
> DF.
Marc:
As you have not received a (public) reply yet, let me try. You may need to
take what I say with a spoonful of salt, though.
Basically, your request makes no sense. The nature of a legend is that it
provides information about a specific plot (e.g. the group labels associated
with point color
What about validating forecasting results. I have 5 years of data and have
been forecasting the following three years i.e. 2010 to 2012.
How can i check my forecast.
Why types of tests are out there that can be implemented in R??
--
View this message in context:
http://n4.nabble.com/forecasti
Dear Drs Winsemius and Berry,
Thanks a lot for your comment and suggestions on running my model. I am
not just new to R but new to CLM as well. :( With your suggestions, I
figure out that I have huge misunderstandings on the model and data
arrangement.
After my finals, I have read again rela
On Fri, 18 Dec 2009, Hien Nguyen wrote:
Dear Drs Winsemius and Berry,
Thanks a lot for your comment and suggestions on running my model. I am not
just new to R but new to CLM as well. :( With your suggestions, I figure out
that I have huge misunderstandings on the model and data arrangement.
On Dec 18, 2009, at 2:46 PM, Hien Nguyen wrote:
Dear Drs Winsemius and Berry,
Thanks a lot for your comment and suggestions on running my model. I
am not just new to R but new to CLM as well. :( With your
suggestions, I figure out that I have huge misunderstandings on the
model and data
You can get this using the caret package. There are a few package
vignettes that come with the package and a JSS article
http://www.jstatsoft.org/v28/i05/paper
about the package.
Max
On Fri, Dec 18, 2009 at 12:26 PM, bbslover wrote:
>
> as known, svm need tune some parameters like cost,gamm
Hi All,
I have a quick question regarding Principal component. I ran principal
components on two data sets cases and controls. I am interested in knowing
if there is a significant difference between the cases and the controls, I
was wondering if there is a test that test if there is a significan
I don't find a function to print a string to file. Would somebody let
me know what function I should use?
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-
DispersionMap wrote:
What about validating forecasting results. I have 5 years of data and have
been forecasting the following three years i.e. 2010 to 2012.
How can i check my forecast.
Why types of tests are out there that can be implemented in R??
isbn 9780553213515
Sorry, couldn't resis
cat
On Fri, Dec 18, 2009 at 2:12 PM, Peng Yu wrote:
> I don't find a function to print a string to file. Would somebody let
> me know what function I should use?
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
>
Hello fellow listers,
Can anybody show (or point to) a simple EXAMPLE using
panel.refline()
to draw gridlines on a log-log xyplot?
The idea is to draw something like figure 8.5 in
http://lmdvr.r-forge.r-project.org/figures/figures.html
but with log-scaled grid lines.
Thank you,
Ivan
Ivan
Say I have a dataframe like this:
df <- data.frame(cbind(c(1,0,0,1),c(0,1,0,0),c(0,0,1,0)))
names(df) <- c('a','b','c')
I would like to create a factor in a new column, where the factor values are
taken from the column names, like this:
> df2
a b c f
1 1 0 0 a
2 0 1 0 b
3 0 0 1 c
4 1 0 0 a
Use the online help:
help.search('file')
and then see:
base::sink Send R Output to a File
help.search('print') will get you there also, but not as directly.
The cat() function is good also, as Gray mentioned.
-Don
At 2:12 PM +1800 12/19/09, Peng Yu wrote:
I don't find
On Fri, Dec 18, 2009 at 12:12 PM, Peng Yu wrote:
> I don't find a function to print a string to file. Would somebody let
> me know what function I should use?
>
I generally use writeLines() to print a string or vector of strings.
-Charlie
[[alternative HTML version deleted]]
_
you can try:
df$f<-names(df)[apply(df,1,function(x) which(x==1))]
Ehud
On Fri, Dec 18, 2009 at 10:48 PM, Daniel Nordlund
wrote:
> Say I have a dataframe like this:
>
> df <- data.frame(cbind(c(1,0,0,1),c(0,1,0,0),c(0,0,1,0)))
>
> names(df) <- c('a','b','c')
>
> I would like to create a factor i
On Fri, Dec 18, 2009 at 12:03, Marc Giombetti wrote:
> Dear R users,
>
> I am new to R and I couldn't figure out how to solve the following
> problem:
>
> I am trying to put a legend below two plots using the code below. The
> legend appears in the second plot,
> but I want the legend to appear b
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Daniel Nordlund
> Sent: Friday, December 18, 2009 12:49 PM
> To: r-help@r-project.org
> Subject: [R] how to combine multiple indicator variables in a
> single factor
>
> Say I h
Thanks to Ehud Cohen and William Dunlap for their assistance. Both solutions
worked and were helpful.
Dan
Daniel Nordlund
Bothell, WA USA
> -Original Message-
> From: ehud cohen [mailto:ehudco.l...@gmail.com]
> Sent: Friday, December 18, 2009 1:05 PM
> To: Daniel Nordlund
> Cc: r-help@
All,
I have used package.skeleton, edited the .Rd files and the DESCRIPTON file.
In one of my package functions I am using RODBC so I have a line of code
that reads: require(RODBC).
In my DESCRIPTION file I have the following relevant line:
Depends: R (>= 2.9.0), RODBC
However, when I do a che
Sorry this may well be defined as Off Topic. I apologize in advance.
I am interested in performing what I think would be a probabilistic sensitivity
simulation. I've done some crude ones before in excel but I'm wondering if R
can help me do it more effectively?
I have a set of theoretical va
You might also look at the Hmisc package's score.binary function.
Frank
Daniel Nordlund wrote:
Thanks to Ehud Cohen and William Dunlap for their assistance. Both solutions
worked and were helpful.
Dan
Daniel Nordlund
Bothell, WA USA
-Original Message-
From: ehud cohen [mailto:ehudc
Thanks a lot for answering my questions.
I have tried to run the clogit for only 64 observations and 4
independent variables and the results are solved instantly. However,
when I run the same command (with only 4 dependent variables) for the
full data, it keeps running for 50 minutes now. :(
On Dec 18, 2009, at 7:39 PM, Hien Nguyen wrote:
Thanks a lot for answering my questions.
I have tried to run the clogit for only 64 observations and 4
independent variables and the results are solved instantly. However,
when I run the same command (with only 4 dependent variables) for
th
On Fri, 18 Dec 2009, Hien Nguyen wrote:
Thanks a lot for answering my questions.
I have tried to run the clogit for only 64 observations and 4 independent
variables and the results are solved instantly. However, when I run the same
command (with only 4 dependent variables) for the full data,
Thanks Felix, I got others except:
1. Is it possible to reduce the gaps between the boxplots, may be say "NO
GAP".
2. I tried col="red" option, but its not changing the border color of boxes.
R Code:
g <- rep.int(c("A", "B", "C", "D"), 125)
t <- rnorm(5000)
a <- sample(t, 500, replace=TRUE)
b <
Hi all
I want to get the design matrix for a model, evaluated at a single value.
For example, if I pass in a data frame with a=2, b=2, y=3, and my
model is y ~ a+b+a:b, then I would like to get
the values 3, 2, 2, 4 out. I can do this with:
tmp <- model.matrix(fit, data=mydata)
or
tmp <- predic
On Fri, 18 Dec 2009, Jeff Breiwick wrote:
All,
I have used package.skeleton, edited the .Rd files and the DESCRIPTON file.
In one of my package functions I am using RODBC so I have a line of code
that reads: require(RODBC).
In my DESCRIPTION file I have the following relevant line:
Depends: R
83 matches
Mail list logo