.
Thanks for helping,
Chuck
On Thursday, January 6, 2022, 12:14:15 PM EST, Duncan Murdoch
wrote:
I've downloaded your code, and I'm seeing some strange results. When I
source MetroTest.R, it creates a log file ending
Error in if (xseg[w1] > ub & m == 1) olrmark[w
ple
OSs. Since I'm not a programmer by profession, I've had little need to use
these constructs.
Chuck Coleman
On Wednesday, January 5, 2022, 02:51:07 PM EST, Duncan Murdoch
wrote:
On 05/01/2022 2:09 p.m., Ivan Krylov wrote:
> On Wed, 5 Jan 2022 21:22:37 +0300
> Ivan Kry
arlier versions of R. (I
don't want to tamper with my installations.) Afterwards, I have no idea.
Hence, my post.
Thank you for your help,
Chuck
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mail
Hello,
I am trying to answer the question:
"What is the probability of a certain day's low forecast (of 21) being the
month's overall low?"
I decided to attempt it in R
Searching pointed me to extreme value analysis.
I created a csv file of the last 8 years lows for the month:
year month
Hello,
I am new to R, a computer programmer friend of mine recommended R for a
project I have on my plate.
(He is not a R guy but knows I need to consider it for the problem I
described to him)
Frist, I have plenty of data
I have been doing this task with regression models but was asked to try
ackage for SimpleR that is compatible with R 3.x.x?
2) Is there still a binary version of R 1.5.x (or above) that works for
Windows? I could use this for the manual, and then switch to 3.x.x for further
work.
Thanks,
Chuck Nelson
[[alternative HTML versi
My apologies.
I still do not understand the difference; good luck.
Hard Core wrote
> this is wrong because with the command "unique" it counts the only values
> that are unique ..
>
> in my column, for instance, 1 and 4 are not unique so the formula doesn't
> work in my case
--
View this m
length(unique(a))
Hard Core wrote
> Hello,
> Suppose that i have a dataframe
> a <- read.dta("banca_impresa.dta")
>
> i have a column with 17900 obs like
>
> 1
> 2
> 3
> 1
> 6
> 7
> 8
> 3
> 4
> 4
>
> and i want to know the number of the different values so in this case it
> would be 7
> Ho
1st. Calm down, this doesn't seem that important.
Then you will need to know some base functions.
see
?rnorm
Doing this 10,000 times and making them of size 50 is no problem.
FYI: I don't understand what "with replacement case" means; could you
clarify?
Jasmin wrote
> Hi,
> I want to gener
Please take the advice of Berend if you ever want to get help here. Also,
you will need to do some basic and initial work yourself; read what he
suggested, use Google to search keywords, and see great help like this:
http://cran.r-project.org/doc/contrib/Short-refcard.pdf
also, use the built in
untested, but something like this should get you what you want:
no.it <- 5
out <- vector("list", length=no.it)
for(i in 1:no.it){
mydata2 <- mydata[ sample(1:nrow(mydata), 76000/no.it) ,]
out[[i]] <- coef(
glm(f_ocur~altitud+UTM_X+UTM_Y+j_sin+j_cos+temp_res+pp+offset(log(1/off)),
data
see:
?boot
SASandRlearn wrote
> I have a large dataset from which i need to take a random sample many
> times ( say N=50) and run it through the same glm() - logistic regression
> model everytime ( 50 times ) and capture the chi-square p-values ( Pr >
> ChiSq ) of the variables for each run an
Yes.
see:
?lm
?coef
?write.csv
also, if
fit <- lm(Y~X)
then:
slope_p-value <- summary(fit)[[4]][2,4]
Double check that last one for yourself.
Good luck.
hoguejm wrote
> I want to export the coefficient values and p-values from my regression
> output into a spreadsheet. Is there a way to
Hello,
Here is a link to some data:
http://www.epa.gov/emap/html/data/surfwatr/data/mastreams/9396/wchem/chmval.txt
I am trying to read this in, and want to use:
chmval <-
read.table("http://www.epa.gov/emap/html/data/surfwatr/data/mastreams/9396/wchem/chmval.txt";,
sep=",", skip= 84, header=T)
epends on what you plan to do with them,
> and what sort of output you expect.
>
> It isn't even clear whether you plan to do this in R.
>
> Sarah
>
>
> On Wed, Oct 31, 2012 at 12:56 PM, chuck.01 <
> CharlieTheBrown77@
> >wrote:
>
>> Sorry, I
Sorry, I know I should read a little 1st about this, but I am actually just
helping somebody really quick and need help too.
I want to grep all of the names of the .txt files mentioned on this html web
page:
http://www.epa.gov/emap/remap/html/three/data/index.html
Thanks ahead of time.
--
Vi
onds.
>
> So, may be it is better to add a sec and later subtract it.
>
> dates.mine2<-dates.mine+1
> dates.mine2[3]
> #[1] "2009-05-22 00:00:01 GMT"
> dates.mine3<-dates.mine2-1
> dates.mine3[3]
> #[1] "2009-05-22 GMT"
> A.K.
>
>
&g
0:00 GMT" "2009-05-21 23:45:00 GMT"
[3] "2009-05-22 00:00:00 GMT" "2009-05-22 00:15:00 GMT"
dates.mine[3]
[1] "2009-05-22 GMT"
chuck.01 wrote
> Hi,
>
> I have some dates that are giving me a problem, in general the dates look
> like this
Um, OK.
My dates have times, they are 00:00:00 (i.e. midnight)
I'll just add a fraction of a second my dates and go with it.
Thanks for the reply.
arun kirshna wrote
> HI,
> Please check this link
> (http://rss.acs.unt.edu/Rdoc/library/base/html/as.POSIXlt.html).
> "Dates without times are
Hi,
I have some dates that are giving me a problem, in general the dates look
like this:
free.dates[60:61]
[1] "2009-05-21 23:45:00 GMT" "2009-05-22 00:00:00 GMT"
but for some reason, when taken "alone", they look like this:
free.dates[60]
[1] "2009-05-21 23:45:00 GMT"
free.dates[61]
[1] "2009
Hi,
Let say I have a date variable like this:
structure(1243792800, class = c("POSIXct", "POSIXt"), tzone = "GMT")
[1] "2009-05-31 18:00:00 GMT"
How can I make it 10 days prior, so:
[1] "2009-05-21 18:00:00 GMT"
I'm randomly selecting dates from a list and want a second value a set #
of days
got it, sorry!
structure(1243792800, class = c("POSIXct", "POSIXt"), tzone =
"GMT")-(60*60*24*10)
chuck.01 wrote
> Hi,
> Let say I have a date variable like this:
>
> structure(1243792800, class = c("POSIXct", "POSIXt"), tzone =
1) get differences
2) run t-test on #1
* Be warned: I am not a statistician.
Tammy Ma wrote
> Dear All,
>
> I have two samples as the following:
> conjps<-c(9.41,10.45,10.78,10.73,11.11,11.12,11.59,11.04,11.63)
>
> ms<-c(4.11,5.10,5.70,6.46,6.04,6.16, 6.24,6.32,7.33)
>
> I want to test
Thanks Jean,
Your 1st solution was one I've tried, w/o great success. The 2nd works a
lot better (on real, and more messy, data), especially when I set span to a
much smaller number than 1/10.
Thank you greatly.
-Chuck
Jean V Adams wrote
> Using the data you provided, a combin
hello,
I have some data that looks similar to this (only not as nice as this):
Y <- c(abs(rnorm(100, 0.10, .1)), seq(.10, 1.0, .3)+rnorm(1, 0, .5) ,
seq(0.8, 4.0, .31)+rnorm(1, 0, .5)
, seq(3.9, .20, -.2)+rnorm(1, 0, .5) , abs(rnorm(100, 0.13, .1)) , seq(.10,
1.2, .35)+rnorm(1, 0, .5)
, seq(0.7,
Try this as a starting point; dat is your whole data set, and r = correlation
coefficient threshold:
spec.cor <- function (dat, r, ...)
{
x <- cor(dat, ...)
x[upper.tri(x, TRUE)] <- NA
i <- which(abs(x) >= r, arr.ind = TRUE)
data.frame(matrix(colnames(x)[as.vector(i)], ncol = 2)
nevermind...
I forgot the column of 1's for the intercept term
chuck.01 wrote
>
> Hi,
> I was playing around with something else and I noticed this matrix code
> for residuals in a linear model doesn't say what lm() says. Please tell
> me if I am completely misguide
Hi,
I was playing around with something else and I noticed this matrix code for
residuals in a linear model doesn't say what lm() says. Please tell me if I
am completely misguided here.
data(mtcars)
Y <- as.matrix(mtcars[,1])
X <- as.matrix(mtcars[,c(2:11)])
# shouldnt this:
H <- X %*% solve(
FYI:
As you are likely thinking: this doesn't belong here (It just occurred to
me), I am questioning what I did, not the output of lm()
But if someone knows why I am wrong please let me know.
chuck.01 wrote
>
> Hi,
> I was playing around with something else and I noticed th
~EP, random= ~1|No, data=petrol)
I'd really like to use the variable... again, this is inside a function.
Any idea how to solve this.
Thanks for your time and expertise,
Chuck
chuck.01 wrote
>
> please note that I edited the original message to say:
>
>> length(with(new
Hi,
How can I round up and down to the nearest hundredth
example:
x <- 0.18
how do I round down to 0.15?
how do I round down to 0.20?
--
View this message in context:
http://r.789695.n4.nabble.com/round-up-down-to-nearest-hundredth-tp4629451.html
Sent from the R help mailing list archive at
please note that I edited the original message to say:
> length(with(new3, perm.score))==length(with(new3, get(TRAIT1)))
[1] TRUE
chuck.01 wrote
>
> Hi,
> The following lines of code are inside of a function, where "TRAIT1" is
> a function variable calling a
Hi,
In the following lines of code are inside of a function, where "TRAIT1" is
a function variable calling a column-name inside of the data.frame "new3".
This works just fine:
m2 <- lmer(get(TRAIT1) ~ perm.score + (1|site), data=new3)
but this will not work,
m3 <- lme(get(TRAIT1) ~ perm.sc
# dput() example
# lets say you have data called y, like this:
> y
sp1 sp2 sp3 sp4
d 0 0 0 0
e 0 0 0 0
f 0 0 0 0
# ok, so do this:
> dput(y)
structure(list(sp1 = c(0, 0, 0), sp2 = c(0, 0, 0), sp3 = c(0,
0, 0), sp4 = c(0, 0, 0)), .Names = c("sp1", "sp2", "sp3", "sp4"
)
--
View this message in context:
http://r.789695.n4.nabble.com/fill-a-dataframe-with-zeros-where-the-rows-are-a-smaller-subset-of-a-larger-dataframe-species-by-sit-tp4586534p4586711.html
Sent from the R help mailing list archive at Nabble.com.
__
R-he
I figured as much.
Thank you greatly.
plangfelder wrote
>
> On Wed, Apr 18, 2012 at 7:25 PM, chuck.01 <CharlieTheBrown77@>
> wrote:
>> Let say I have an object (I hope my terminology is correct) a
>> a <- 12
>>> a
>> [1] 12
>>
>> An
Let say I have an object (I hope my terminology is correct) a
a <- 12
> a
[1] 12
And "a" has been assigned the number 12, or whatever
And lets say I have a character "call_A"
call_A <- "a"
>call_A
[1] "a"
What is the function "F" that allows this to happen:
> F( call_A )
[1] 12
--
View this mes
This is one way:
f <- function(x, y){
Z <- ifelse(x==y, 3, 4)
return(Z)
}
DS[3] <- with(DS, f(X,Y))
colnames(DS)[3] <- "Z"
But you don't really need a function to do that.
DS[3] <- with(DS, ifelse(X==Y, 3, 4)) # this works just fine
I'm glad you've decided to use R; eventually you will ne
Sun, Apr 1, 2012 at 4:55 PM, Michael Sumner <mdsumner@> wrote:
>>> Try the R-Sig-Geo mailing list for a better target community, but if
>>> these
>>> are shapefiles there is read support in rgdal (or maptools for a simpler
>>> alternative) and if these a
Hi,
I want to use map("state") and have the ecoregion shape (please see link)
file projected onto this.
ftp://ftp.epa.gov/wed/ecoregions/cec_na/NA_CEC_Eco_Level3.zip
ftp://ftp.epa.gov/wed/ecoregions/cec_na/NA_CEC_Eco_Level3.zip
Could someone please show me how; I have never messed with this so
Could you please post a small example of your data and code which gives you
this error. Your assumed error distribution sounds reasonable. I am
interested as to why you have zeros... you have sites with species richness
==0 ??
Lívia Dorneles Audino wrote
>
> I'm trying to make a glmm to i
You really need to read one of many beginners guides to R; but I will say
this much:
YOUR_DATA <- read.table("nigeria slr misc/Nigeria India /DBHHISTOGRAM.txt",
header=TRUE)
then you should be able to plot it like I said previously.
If that still doesn't work, you need to read the posting guide
dbh is the column name. What is the name of your data?
Lets assume your data is called "YOUR_DATA"
then try:
with(YOUR_DATA, hist(dbh))
OR
hist(YOUR_DATA$dbh)
OR
hist(YOUR_DATA[, "dbh"])
etc...
bamboohydraulics wrote
>
> Dear all
>
> I am a BEGINNER and have R on my Mac. I saved my
1) thats not a function (i'm sure just a mistake)
2) Just add another plot line
myplot <- function(x){
plot(x)
pdf("xplot.pdf")
plot(x)
dev.off()
}
myplot(1:20)
casperyc wrote
>
> Hi all,
>
> I know how to use pdf() and dev.off() to produce and save a graph.
>
> However, wh
Using your posed data, the variable price was numeric:
data.precios <-
read.table("http://r.789695.n4.nabble.com/file/n4498828/p_diarios.txt";,
header=T)
str(data.precios)
'data.frame': 1996 obs. of 2 variables:
$ time : int 37988 37991 37993 37994 37995 37998 37999 38000 38001 38002
...
$
Without taking away all the fun of trial and error, and exploration in R... I
will direct you to this website which I found invaluable when I first began
to use R.
one way would be to use:
plot(Yourdata, type="n")
and then 3 text() or points() statements to plot the groups represented by
differen
] = 200 - x[i]
}
# finally, this will reassemble the output of the for loop
z <- do.call(cbind, z)
colnames(z) <- c("z1", "z2", "z3")
# Finally, do read what the others sent you as they provide more efficient
solutions
HTH
Chuck
Hassan Eini Zinab wrote
>
Example data would be helpful
A Ezhil wrote
>
> Dear All,
> I have two matrices A (40 x 732) and B (40 x 1230) and would like to
> calculate correlation between them. I can use: cor(A,B, method="pearson")
> to calculate correlation between all possible pairs. But the issue is that
> there is
ot;)
>
> paste(x[1, 1], do.call(paste, c(x[1, x != ""][, -1], list(sep="_"))),
> sep=" -")
>
> # Output looks like this
>> paste(x[1, 1], do.call(paste, c(x[1, x != ""][, -1], list(sep="_"))),
>> sep=" -")
I have this type of format:
structure(list(day = 19, C1 = structure(1L, .Label = c("", "C1"
), class = "factor"), C2 = structure(2L, .Label = c("", "C2"), class =
"factor"),
C3 = structure(1L, .Label = c("", "C3"), class = "factor"),
Q1 = structure(2L, .Label = c("", "Q1"), class = "fact
Untested die to no data, but this should work with a loop
out=vector("list", length= length(MyVector))
for(i in 1 : length (MyVector))
{
x <- data.frame (sum (MyTable ==MyVector[i]))
out[[i]] <- x
}
sum(do.call(rbind, out))
--
View this message in context:
http://r.789
see:
?sample
library(vegan)
?rrarefy
not knowing your data structure, its hard to say.
camilleislande wrote
>
> Hello
> I have several populations where I have morphology and diet for each
> individual. I am interested in the correlation between diet and
> morphological distances. However the
Hello,
I have recently had issues with read.csv where i get the following warning,
and this happens on both my OSX and Linux machines. Here is the warning
and an example CSV file is attached:
Warning message:
In read.table(file = file, header = header, sep = sep, quote = quote, :
incomplete
this is ugly, but...
l <-length(patrn)
l2 <-length(exmpl)
out <- vector("list")
for(i in 1:(l2-l+1))
{
exmpl[i:(i+l-1)]
patrn==exmpl[i:(i+l-1)]
if(all(patrn==exmpl[i:(i+l-1)]))
{ out[[i]] <- i } else { out[[i]] <- "NA"}
}
out <- do.call(c, out)
as.numeric(out[which(out!="NA")])
##
sum(ifelse(x*total!=0, as.numeric(x> total), 0))
arunkumar wrote
>
> Hi
>
> I have two vector
>
> x=c(10,30,40,50)
> total=c(20,20,0,10)
>
> Var_exceeding_total=sum(as.numeric(x> total))
>
> This will compare the vectors x and total a gives the result.
>
> if i want to compare only if t
I believe this should work
d <- read.table("foo.csv", header=T, sep=",", comment="T")
although its spitting back a warning... this used to work for me.
Noah Silverman wrote
>
> Hi,
>
> I have a CSV file that is formatted well, except that the last line is a
> "summary" not is CSV format.
Hello,
given the set of grey points (corners of squares, see visual)... something
like this:
http://r.789695.n4.nabble.com/file/n4363505/Slide2.png
how do I calculate the average value of the variable z, that was measured at
the corners of the rectangles (represented by the black points in th
I found something a little different:
> median(nb10[,1])
[1] 404
> mean(nb10[,1])
[1] 404.59
compare them
They are different. Your sample is not perfectly symmetrical (50% above,
50% below) about the mean (ie. the third standardized moment (skewness) is
not zero). This is really not a ques
http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=search_page&node=789695&query=cbind+with+different+rows
Rambler1 wrote
>
> I am trying to bind two matrices of different length. They both are one
> column and many rows but the rows differ by a few. How am I able to cbind
> them toge
I wanted)
Per_neg_0.5 <- (length(which(z.2<=-.5))*diff_y*diff_x)/total_area
If you see a problem, please let me know.
chuck.01 wrote
>
> Ok,
> I've since found this:
>
> # called previously posted dataset "dat"
>
> attach(dat)
> library(akima)
Ok,
I've since found this:
# called previously posted dataset "dat"
attach(dat)
library(akima)
data.interp <- interp(x,y,z)
contour(data.interp)
any idea how to calculate area within specified contour lines?
Thanks
chuck.01 wrote
>
> Hello,
> I have some da
Hello,
I have some data that will be in the form:
structure(list(station = structure(c(20L, 2L, 4L, 19L, 3L, 11L,
1L, 5L, 10L, 12L, 17L, 18L, 6L, 9L, 13L, 16L, 7L, 8L, 15L, 14L
), .Label = c("1", "10", "11", "12", "13", "14", "15", "16",
"17", "18", "19", "2", "3", "4", "5", "6", "7", "8", "9",
Hard to help without a short example dataset (please read posting guide!)
posted with dput().
You likely want to "paste" together a title for your graph.
see
?paste
Rambler1 wrote
>
> Another simple question that is driving me crazy:
> I have a for loop that loops through a matrix and pulls d
the code without the "function(dat,...){}" and have it run in a
> larger function?
> Also what is the context of the command "dat" R is very new and confusing
> to me and sometimes ?# doesn't fully explain it for me. Thank you!
>
>
>
> chuck.01 wr
This is true with regard to all things you don't understand in R... use
question mark (?) # this will show you the manual, or help page
?dput
also, make sure you hit the "quote" button when you reply on this forum so
that people know what you are replying to.
I used dput() to create the follo
Please use dput() to post your example matrix.
Rambler1 wrote
>
> I have run into a problem in my code. What I want to accomplish is this:
> I have a user input stock symbols into a list and from there I run the
> quantmod package to get historical data. I compute the correlation matrix
> and
initial guess is just so far gone that the nls()
> optimizer can't handle it.
>
> If you try a more reasonable initial guess it works fine:
>
> fit <- nls(Y ~ a*exp(-k * X), datum, start=c(a=3400, k=1.867))
>
> Michael
>
> On Wed, Nov 30, 2011 at 12:14 PM, chuck.01 <C
estimates
I have never attempted to fit a non-linear model before, and thus the model
may be inappropriately specified, or it is also possible that I have no idea
what I am doing.
Would someone please offer some advice.
Thanks.
Chuck
--
View this message in context:
http://r.789695.n4.nabble
_
> 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.
--
Chuck Cleland, Ph.D.
NDRI, Inc. (www.ndri.org)
71 We
v)
summary(MIcombine(betas,vars))
> Thank you!
>
> Daniel
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting
ed, minimal, self-contained, reproducible code.
--
Chuck Cleland, Ph.D.
NDRI, Inc. (www.ndri.org)
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 512-0171 (M, W, F)
fax: (917) 438-0894
__
R-help@r-project.org mailing lis
> 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.
--
Chuck Cleland, Ph.D.
NDRI, Inc. (www.n
d after that I've selected elements different from zero
> ...it is quite long...
> can you find an easier solution?
>
> Thank you for you help
--
Chuck Cleland, Ph.D.
NDRI, Inc. (www.ndri.org)
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (
t.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.
--
Chuck Cleland, Ph.D.
NDRI, Inc. (www.ndri.org)
71 West 23rd Street, 8th flo
On 5/13/2010 11:04 AM, Chuck Cleland wrote:
> On 5/13/2010 10:02 AM, John Edwards wrote:
>> Hello,
>>
>> How ls() only functions or only data objects (basically anything other than
>> functions) such as data.frame, numeric ...?
>
> c(ls.str(mode = "function&
nd provide commented, minimal, self-contained, reproducible code.
--
Chuck Cleland, Ph.D.
NDRI, Inc. (www.ndri.org)
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 512-0171 (M, W, F)
fax: (917) 438-0894
__
R-h
how the timing compares, but I like the simplicity and
readability of replicate().
hope this helps,
Chuck
> Someone told me that the apply functions are barely any faster than for
> loops, so what is the best way, in general, to approach this type of problem
> in R-style?
> Could s
c(1, rep(2, length(v) - 2), 1))
[1] 1 2 2 3 3 4
> So the question is, is there a better way specify the last element of a
> vector? If not, is there a better way to duplicate all elements of a vector
> except for the first and last? (I know you can achieve this using two
> lines, but
**
>
>
>
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-
st
> 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.
--
Chuck Cleland, Ph.D.
NDRI, Inc. (www.ndri.org)
71
Depending on the size of the dataframe and the operations you are
trying to perform, aggregate or ddply may be better. In the function
below, df has the same structure as your dataframe.
Check out this code which runs aggregate and ddply for different
dataframe sizes.
I have a dataframe with almost a million rows which has one column
with strings. That column has several entries with the words "South",
"North", "East" and "West" which I would like to replace with S, N, E,
and W, respectively. Obviously, I can use gsub multiple times df
$col2 <- gsub("West", "W
na(tm1)) == 0]
> I search a lot, all I found is how to delete column with all NA values..
>
> Thanks a lot
>
> muting
--
Chuck Cleland, Ph.D.
NDRI, Inc. (www.ndri.org)
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 512-0171 (M, W, F)
fax
__
> 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.
--
tp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
--
Chuck Cleland, Ph.D.
NDRI, Inc. (www.ndri.org)
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 512-0
ect.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.
--
Chuck Cleland, Ph.D.
NDRI, Inc. (www.ndri.org)
71 West 23rd Street, 8t
29.62672
> full documents are in the attachment,
> can someone suggest to me the relevent R codes
> that does the same sort of thing?
> (tukeyHSD,fisherLSD,and anova table )
>
> Thanks!
>
> casper http://n4.nabble.com/file/n1583109/SAS.pdf SAS.pdf
> http://n
Dear John,
Thanks very much for your message. I should have looked at the help
page for sem() more closely. Thanks again for your excellent work on
the package.
Regards,
Chuck
On 3/3/2010 10:18 AM, John Fox wrote:
> Dear Chuck and Daniel,
>
> First, thanks Chuck for fielding the
could be. If anyone has approaches to specifying the models that are
less sensitive to starting values, or ways for less sophisticated users
to generate good starting values, please share.
Chuck
# Begin Code for Models A-D, Chapter 8, Singer & Willett (2003)
alc2 <-
read.table("h
ng 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.
--
Chuck Cleland, Ph.D.
NDRI, Inc. (www.ndri.org)
71 West 23rd Street,
This question is about column names returned by the aggregate function.
Consider the following example
df <- data.frame(
id = c(rep('11',30),rep('22',30),rep('33',30)),
value = c(rnorm(30,2,0.5), rnorm(30,3,0.5), rnorm(30,6,0.5))
)
aggregate(df[,c("value"),drop=FALSE], by=list(id=df$id), m
Thank you both for your response. As the names suggest, I am plotting the
sales & price data for items over time to understand the how certain items may
be more responsive than others to price changes.
Another way of displaying this information on the same chart as the one showing
sales, would
I am trying to plot this dataset using ggplot2:
df <- data.frame(
sid = c(rep('11',30),rep('22',30)),
time = rep(ISOdate(year = 2010, month = 1, day = 1:30),2),
sales = c(rnorm(30, 1000, 20),rnorm(30, 900, 10)),
price = c(rnorm(30, 2, 0.5),rnorm(30, 3,0.5))
)
Plotting just the sales
ing seems to work:
data.frame(sapply(col2.uniq, function(col) {
wcol <- which(col==col2)
as.numeric(rowSums(data.frame(data.df[,wcol]))>0)
}))
I had to wrap data.df[,wcol] in another data.frame to handle situations where
wcol had one element. Is there a better approach?
---- Chuck Whi
Hello -- I am trying to merge columns in a dataframe based on substring matches
in colnames. I would appreciate if somebody can suggest a faster/cleaner
approach (eg. I would have really liked to avoid the if-else piece but rowSums
does not like that). Thanks.
data.df <- data.frame(aa=c(1,1,0),
ial==2 & Tanks=="a4"|Trial==2 &
> Tanks=="c4"|Trial==2 & Tanks=="h4")
> daily.sub1<-as.data.frame(daily.sub)
> attach(daily.sub1)
> daily.sub1
> x11()
> plot(Day, Wgt)
> #plot(Day, Wgt, pch=c(2,19,21)[Tanks])
> detach(daily
;
>
> Since this question properly belongs on the ggplot2 list, it is being cc'ed
> there as well.
>
> HTH,
> Dennis
>
> On Mon, Feb 1, 2010 at 6:06 PM, Chuck White wrote:
>
> > Hello, I am trying to plot time-series data with certain weeks highlighted
> &g
Hello, I am trying to plot time-series data with certain weeks highlighted
using symbols.
require(ggplot2)
#plotting time series data
timescale <- seq(as.Date("01/01/09","%m/%d/%y"), length.out=12, by=7)
data.all <- data.frame(
id = c(rep('111',12),rep('222',12),rep('333',12)),
week=c(ti
?
Something like this:
print(xyplot(temp_species_EAM_Pred_Pop$x + temp_species_NULL_Pred_Pop$x
~ temp_species_EAM_Pred_Pop$Action,
main=current_species,
xlab="Action",ylab="Predicted Pop",
xlim=c(xmin,xmax),ylim=c(ymin,ymax),
Hello -- I posted this question yesterday and for some reason the post seems to
be attached to the wrong thread. Also, I extended my test a little and it seems
to indicate the problem is with spm. I would appreciate any help. Thanks.
==
lib
1 - 100 of 346 matches
Mail list logo