Displaying 20 results from an estimated 99 matches for "epamail".
2006 Sep 11
5
Successive Graphs
...e next until I am left
with only the plot of the eighth matrix at the end of the script. Thanks
in advance for your help!
Amy Paternostro
National Center for Environmental Economiccs
United States Environmental Protection Agency
1200 Pennsylvania Avenue, NW
Washington, DC 20460
Paternostro.Amy at epamail.epa.gov
2005 Jan 13
4
zero index and lazy evaluation in ifelse()
I don't understand this behavior:
> a <- c(0, 1, 2, 3)
> b <- c(1, 2, 3, 4)
> ifelse (a == 0, 0, b[a])
[1] 0 2 3 1
rather than the desired 0 1 2 3. Thanks for any explanation.
2003 Sep 29
4
Data frame transpose
Hi All,
I want to ask if there is a transpose function for data frame like the
procedure of transpose in SAS? Because I want to partially transpose a
data frame which contains 5 columns (siteid, date, time, obs, mod), what
I want to do is to put time as the column variables along with siteid,
and date, and put obs and mod in the row names. specifically to
transpose a data frame:
siteid date
2003 Apr 04
3
creating function bodies using body()
I'm having trouble figuring out how to create a function using "body<-"
(). The help file for body() says that the argument should be a list of
R expressions. However if I try that I get an error:
> tmpfun <- function(a, b=2){}
> body(tmpfun) <- list(expression(z <- a + b),expression(z^2))
Error in as.function.default(c(formals(f), value), envir) :
2004 Mar 30
4
rank() vs SAS proc rank
SAS proc rank has ties options of high and low that would allow
producing ranks of the type found in the sports pages, e.g.,
rank (c(1,1,2,2,2,2,3)) == 1 1 3 3 3 3 7
Could R support these ties.methods?
2003 Mar 05
2
reserved words documentation
I wanted a data frame component to be named "next", for example:
> m <- data.frame (matrix (0, nrow=2, ncol=2))
> names (m) <- c("prev", "next")
> m
prev next
1 0 0
2 0 0
But "next" being reserved prevents $ indexing without quotes:
> m$next
Error: syntax error
> m$"next"
[1] 0 0
Although they are mostly
2002 Mar 06
2
Installing a Package in Windows 2000
...atmanual
zip error: Nothing to do! (try: zip -r9X
C:/R/rw1041/src/gnuwin32/statmanual_1.0.zip . -i statmanual)
--
Thomas M. Kincaid, Ph.D.
Environmental Statistician
Dynamac Corporation
200 SW 35th Street
Corvallis, OR 97333
Phone: (541) 754-4479
Fax: (541) 754-4716
E-mail: Kincaid.Tom at epamail.epa.gov
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-reques...
2002 Aug 29
8
lme() with known level-one variances
Greetings,
I have a meta-analysis problem in which I have fixed effects
regression coefficients (and estimated standard errors) from identical
models fit to different data sets. I would like to use these results
to create pooled estimated regression coefficients and estimated
standard errors for these pooled coefficients. In particular, I would
like to estimate the model
\beta_{i} = \mu +
2011 Sep 16
3
Help writing basic loop
Hello,
I would like to write a loop to 1) run 100 linear regressions, and 2)
compile the slopes of all regression into one vector. Sample input data
are:
y1<-rnorm(100, mean=0.01, sd=0.001)
y2<-rnorm(100, mean=0.1, sd=0.01)
x<-(c(10,400))
#I have gotten this far with the loop
for (i in 1:100) {
#create the linear model for each data set
model1<-lm(c(y1[i],y2[i])~x)
2005 Jul 12
4
Calculation of group summaries
I know R has a steep learning curve, but from where I stand the slope
looks like a sheer cliff. I'm pawing through the available docs and
have come across examples which come close to what I want but are
proving difficult for me to modify for my use.
Calculating simple group means is fairly straight forward:
data(PlantGrowth)
attach(PlantGrowth)
stack(mean(unstack(PlantGrowth)))
2002 Jan 23
4
driving R from Python (calldll?)
Sam Rushing's Python extension 'calldll' will supposedly give me access
to any DLL,
and presumably R.DLL in particular, from Python. I have no experience
manipulating DLLs as
yet. I am learning Python. I can't find any simple step-by-step
instructions on how
to get done what I want to do. Does anyone have experience with this?
Is there a
better way? Of course, one can use
2005 Oct 07
2
Assign references
Folks,
I've run into trouble while writing functions that I hope will create
and modify a dataframe or two. To that end I've written a toy function
that simply sets a couple of variables (well, tries but fails).
Searching the archives, Thomas Lumley recently explained the <<-
operator, showing that it was necessary for x and y to exist prior to
the function call, but I haven't
2002 Jan 15
2
returned values of glim() in S PLus and glm() in R
Dear Experts,
In glim() of S Plus, one of the returned values is "var", the estimated
variance matrix of coefficients. However, in glm() of R (there is no
glim() in R), "var" is not one of the returned values. Anyone know what
could I get the varience matrix of coefficients in glm() in R?
As a novice in R and S+, I'd appreciate your help
Sincerely,
Charlie Liu
2004 Feb 06
3
column names in matrix vs. data frame in R 1.8
Is the difference in behavior below, introduced in 1.8, inconsistent or,
at least, undesirable? I couldn't find this in the NEWS.
On the one hand,
> a <- matrix (1:4, nrow=2)
> a <- data.frame (a)
> names (a) <- c("break","next")
> names (a)
[1] "break" "next"
On the other,
> a <- matrix (1:4, nrow=2)
> dimnames(a)
2003 Feb 11
3
Problems with Rcmd check on Win 2000 & rw1062
When I run Rcmd check on a package on my Windows 2000 machine, I get a
series of error messages like the following:
* checking generic/method consistency ...c:\DOCUME~1\R5018~1.WOO\LOCALS~1\Temp/R
utils138414013: cannot open c:DOCUME~1R5018~1.WOOLOCALS~1Temp/Rin138408157: no s
uch file
It looks as if a Windows style path to the temp directory is not being interpreted correctly, with backslashes
2009 Jul 30
2
Question regarding sqldf
Hello,
I am having a problem using sqldf. I'm trying to choose a subset of
observations from a data set based on the date and maximum value of a
variable by date.
Here is the code I am using:
test<-sqldf("select distinct * from bextuse group by sdate having
bext=max(bext)",method="raw");
The result I get back is a data frame with 0 rows and 0 columns. I have
tried
2002 Feb 19
2
cdf of the standard normal distribution
Dear Experts,
I need to calculate the cdf of the standard normal distribution, i.e.
H(x) = 1/sqrt(2*pi) integral(exp(-z^2/2) dz), where z is b/w -infi to
infi.
I know there should be a way to do it in R, but did not know to do it.
I'd appreciate any help you could offer.
Charlie Liu
Graduate student intern at EPA/ECO
2001 Jul 31
4
nlme: bug in getCovariateFormula (PR#1038)
I found that predict.gnls failed with a wierd error message about a
non-numeric argument to a binary vector in one of three nearly identical
uses.
Error in Inh/Ki : non-numeric argument to binary operator
(Inh and Ki are arguments to the function used in the formula for the
object whose predictions were requested).
It turns out that the problem is in getCovariateFormula().
The final line in
2007 Aug 22
2
gWidgets (tcltk): problem extracting values from widgets in glayout grid
Hello,
I haven't been able to find an example for the second case below -- or
perhaps I didn't recognize it when I saw it.
Is there a value for x such that svalue(x) will return "bbb", either by
itself or as part of an array? Or do I need to do something else
entirely?
(R2.5.1; Windows XP)
> #### gWidgets test
> options("guiToolkit"="tcltk")
>
2004 May 19
2
POSIX to ts and back to POSIX
I am trying to use POSIX datetime objects rather than chron datetime
objects but am having difficulty with POSIX in a time series. My
question: Once a POSIXct vector is bound to a time series, is there a
function to convert back to POSIXct? The following code demonstrates
what I am trying to do.
> ts(as.POSIXct(strptime(tmp,"%m/%d/%Y %H:%M:%S")),freq=1440)
Time Series:
Start =