How can I parameterize the function call to aggregate() below with colx (a
character string) in the following code? That is, replace both if
statements with aaa <- aggregate(colx_something, data=tidy[grpyrs,],sum).
I've tried a couple of ideas for "colx_something" but get an R-error each
time. B
a bitmap be used as the marker for a point?
Thanks in advance for help-I learn a lot from others questions and
appreciate direction (even if it's RTFM!)
Dale
__
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-guide.html
and provide commented, minimal, self-contained, reproducible code.
Thanks to several who responded--I should have looked (doh!) in the
documentation. play3d() and movie3d() were just the ticket!
On 7/28/2011 4:48 PM, Jean V Adams wrote:
>
> Dale,
>
> I do not have the same color problem when I run your code on my PC.
> The colors in both d
s some motion rather than a
static display ;-)
Thanks in advance,
Dale.
library(rgl)
clusset<-data.frame(x=c(round(abs(rnorm(5,7,1)),1),round(abs(rnorm(5,11,2)),1),
round(abs(rnorm(5,16,2)),1),round(abs(rnorm(5,20,1.5)),1),round(abs(rnorm(5,5,2)),1)),
Try
CC=gcc -mno-cygwin
to avoid linking with the Cygwin dlls.
Thanks,
Dale Smith, Ph.D.
Senior Financial Quantitative Analyst
Risk & Compliance
Fiserv.
107 Technology Park
Norcross, GA 30092
Direct NYC: 212-419-3242
Direct Norcross: 678-375-5315
Mobile: 678-982-6599
Mail: dale.sm...@fiserv
separates changes to the R code from the actual gui
used.
I prototyped this solution a few years ago using Windows and it worked
very well.
Thanks,
Dale Smith, Ph.D.
Senior Financial Quantitative Analyst
Risk & Compliance
Fiserv.
107 Technology Park
Norcross, GA 30092
Direct NYC: 212-419-
Yes my example was not the best, it is an oversimplified example. I tried
using your method and didn't seem to work.
--
View this message in context:
http://r.789695.n4.nabble.com/applying-uniroot-function-to-each-element-in-vector-tp3478573p3479895.html
Sent from the R help mailing list archive
If I have a vector of n elements, e.g. a vector of length 4 with elements 10,
20, 30, 40 and want to find the different values of x such that x^2=10,
x^2=20, x^30 and x^2=40, how could I do this in R? I'm thinking of using the
uniroot function, but am finding difficult applying it to a vector. Than
a. Check out Roxygen.
b. Use version control. You will not regret it.
Thanks,
Dale Smith, Ph.D.
Senior Financial Quantitative Analyst
Risk & Compliance
Fiserv.
107 Technology Park
Norcross, GA 30092
Direct NYC: 212-419-3242
Mail: dale.sm...@fiserv.com
www.fiserv.com
-Original Mes
afo = rank,
xtrafo = function(data) trafo(data, factor_trafo = ff),
alternative="greater",
distribution=approximate(B=50))
On Wed, Apr 21, 2010 at 8:23 PM, Dale Steele wrote:
> Is it possible to implement the Jonckheere-Terpstra test for ordered
> alte
concrete, I've
include
a small dataset. Thanks. --Dale
Hollander and Wolfe, 1999 Table 6.6, pg 205
control <- c(40, 35, 38, 43, 44, 41)
rough <- c(38, 40, 47, 44, 40, 42)
accurate <- c(48, 40, 45, 43, 46, 44)
pieces <- list(control, rough, accurate)
n <- c(6, 6, 6)
grp <-
Algorithmics.
For the program committee:
Gib Bassett, Peter Carl, Dirk Eddelbuettel, John Miller, Brian Peterson,
Dale Rosenthal, Jeffrey Ryan
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/
plicated(data)] #find all duplicates
idd <- dd %in% X & dd %in% Y #determine found in both X and Y
duplicates <- dd[idd]
Thanks! --Dale
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/
I'm trying to understand the behavior of seq_along in the following example:
x <- 1:5; sum(x)
y <- 6:10; sum(y)
data <- c(x,y)
S <- sum( data[seq_along(x)] )
S
T <- sum( data[seq_along(y)] )
T
Why is T != sum(y) ?
__
R-help@r-project.org mailing list
, 5)
Error in .C("R_qansari", as.integer(length(p)), q = as.double(p),
as.integer(m), :
C symbol name "R_qansari" not in load table
--Dale
On Wed, Feb 24, 2010 at 8:47 PM, Sharpie wrote:
>
>
> Dale Steele wrote:
>>
>> I would like to be able to use two
I would like to be able to use two functions; qansari and pansari
which are found in the
function ansari.test. How can I evaluate these functions
independently? Thanks. --Dale
For example, when I load the function ...
qansari <- function(p, m, n) {
.C(R_qansari, as.inte
gth: factorial(length(vect))
#length: choose(n, n1)
Best Regards. --Dale
On Thu, Feb 11, 2010 at 10:04 PM, Greg Snow wrote:
> Try this:
>
> druns2 <- function(x, n1, n2) {
>
> if( x %% 2 ) { # odd x
> choose( n1 - 1, n1 - (x+1)/2 ) * choo
n2=4)
#in Wackerly, Mendenhall and Scheaffer, 2002, presumably done using
# exact calculations.
Thanks. --Dale
On Thu, Feb 11, 2010 at 6:08 PM, Greg Snow wrote:
> OK, I think I have it worked out for both cases:
>
> library(vcd)
>
> druns &
rm)
for (i in 1:nperm) {
RUNS[i] <- nruns(sample(x))
}
cdf <- cumsum(table(RUNS))/nperm
return(list(RUNS=RUNS, cdf=cdf, nperm=nperm))
}
MC.runs(dtemp, 10)
Thanks. --Dale
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/
lement this test using library(coin) - is this possible?
Thanks. --Dale
__
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-guide.html
and provide co
matrix without losing the structure?
Thanks. --Dale
x1 <- c(rep(0,4),1)
x2 <- c(rep(0,2),rep(1,3))
x3 <- c(rep(1,3), rep(0,2))
X <- rbind(x1,x2,x3)
X
X <- as.data.frame(X)
library(ade4)
jc.dist <- dist.binary(X, method=1)
sample(jc.dist)
_
SS\scripts file for Chapter 5 and 'subsets' is not a
function in MASS.
I did find this problem is discussed in RNews, Programmer's Niche
1(1):27 - 30 and RNews, 1(2):29-31. Is there function in 'base' R or
other package to do this? Thanks. --Dale
___
The code below create an nxn upper triangular matrix of one's. I'm
stuck on finding a more efficient vectorized way - Thanks. --Dale
n <- 9
data <- matrix(data=NA, nrow=n, ncol=n)
data
for (i in 1:n) {
data[,i] <- c(rep(1,i),
I'm stuck on how best to of find the distance between ordered integers
(presented below as a birthday problem). Given the vector x, how do I
most efficiently generate the vector x[i+1] - x[i]? Thanks. --Dale
For example...
set.seed(555)
x <- sample(1:365, 10, replace=TRUE)
x <-
Open script in Tinn-R, select script to copy. Then use menu Edit:Copy
formatted (to export) --> RTF
Paste into MS word.
--Dale
On Sat, Sep 13, 2008 at 1:30 PM, Daren Tan <[EMAIL PROTECTED]> wrote:
>
> I am generating a report containing several R scripts in the appendix. Is
>
the error.
Also, if you were willing to provide some brief annotation or describe the
overall logic in the code you supplied it would help me immensely.
Thanks,
Dale
-Original Message-
From: jim holtman [mailto:[EMAIL PROTECTED]
Sent: Sunday, July 13, 2008 6:35 AM
To: Hohm, Dale
Cc
icken|Softball;#Heavens to Murgatroyd! Exit stage left!
Thanks in advance,
Dale
-Original Message-
From: jim holtman [mailto:[EMAIL PROTECTED]
Sent: Saturday, July 12, 2008 11:32 AM
To: Hohm, Dale
Cc: r-help@r-project.org
Subject: Re: [R] Reading Multi-value data fields for descriptive a
1
C3 Other Text: a free-form answer
I am uncertain help to read this data into R in this format, so suggestions and
examples would help me greatly.
This is a pretty common data packing scenario, so perhaps there are better
approaches to reading this data and better ways in R to analyze it tha
uggestions and
examples would help me greatly.
This is a pretty common data packing scenario, so perhaps there are better
approaches to reading this data and better ways in R to analyze it than what I
have presented. Suggestions greatly appreciated.
$ sudo apt-get install
Installs installs ESS version 5.3.0. Is there a repository for more
recent version?
Thanks. --Dale
On Sun, May 25, 2008 at 11:24 AM, Roland Rau <[EMAIL PROTECTED]> wrote:
> Hi Wade,
>
> Wade Wall wrote:
>>
>> Hi all,
>>
>> I do
st(fit, "material", rbind("(1 - 2)" =c(1, -1, 0) ))
Estimate Std. Error t value Pr(>|t|)
material(1 - 2) -21 18.37407 -1.142915 0.2631074
> fit.contrast(fit, "temp", rbind("50 - 80" =c(1, 0, -1) ))
Estimate Std. Error
he results from appended SAS code. Thanks. --Dale.
## the dataset (from Montgomery)
twoway <- read.table("http://dsteele.veryspeedy.net/sta501/twoway.txt";,
col.names=c('material', 'temp','voltage'),colClasses=c('factor',
'factor'
Thanks. I found the issue. I was starting R in a terminal with the
command 'sudo R', help.start() was not able to communicate Firefox
when already running. Works fine when R is started as user. --Dale
On Mon, Mar 3, 2008 at 3:09 PM, Marc Schwartz <[EMAIL PROTECTED]> wrote:
&g
Using linux fedora 8 (x86_64) I get the following when firefox is
already running. Is there a way to adjust settings in either R or
firefox to open a new tab when help.start() is invoked? Thanks.
--Dale
> help.start()
Making links in per-session dir ...
If '/usr/bin/firefox' is al
I'm applying a function (Cov.f) defined below to each element of a
distance matrix. When I run the code below, I get a warning message
(below) and elements of returned matrix [2,3] and [3,2] are not zero
as I would expect. Clearly, there is an error... What am I doing
wrong? Thanks. -
polygon?
library(SemiPar)
data(scallop)
plot(scallop$longitude, scallop$latitude)
Thanks. --Dale
__
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
I'm anxiously awaiting my copy of the soon to be published "A First
Course in Statistical Programming with R" by
W. John Braun
University of Western Ontario
Duncan J. Murdoch
University of Western Ontario
Paperback
(ISBN-13: 9780521694247)
http://www.cambridge.org/catalogue/catalogue.asp?isbn=9
Running the function below, tested using the cardiff dataset from
splancs generates the following error. What changes do I need to
make to get the function to work? Thanks. --Dale
> gen.rpoints(events, poly, 99)
> rpoints
Error: object "rpoints" not found
# test spatial data
hanks. --Dale
library(spatstat)
sim.nth.mdist <- function(nth,nsim) {
D <- matrix(ncol=nth, nrow=nsim)
for (i in 1:nsim) {
rpp <- runifpoint(22, win=owin(c(0,1),c(0,1)), giveup=1000)
for (k in 1:nth) D[i,k] <- mean(nndist(rpp ,k=k))
}
D
}
si
39 matches
Mail list logo