Please don't repeat post. In fact, you should definitely read the Posting Guide
mentioned at the bottom if this or any other post from the list and follow its
advice.
The usual way to predict output of a model in R is to use the predict function
appropriate to your model object class. You might
Dear all.
I am trying to relate daily deaths in a given city with air pollution
values. The model I am using is as follows:
model <- glm(deaths ~ pollution + ns(time, 13) + ns(temp, 7) + ns(rh, 5) +
dow + holiday, family=quasipoisson, data=city)
Where -
deaths: daily number of deaths
pollution:
On Thu, 14 Aug 2014 12:15:58 -0400
VG wrote:
> Hi Everyone,
> I am currently using *R version 3.0.0 RC (2013-03-28 r62434) --
> "Masked Marvel"*
>
> I am using Ubuntu 10.04 LTS- the Lucid Lynx.
>
> I downloaded the tar.gz of R 3.1.0 under my Downloads folder.
> I changed my directory to Downlo
On 14/08/2014 23:57, William Dunlap wrote:
Is there a function in core R that takes 2 strings and returns TRUE if
they refer to the same file? (If either does not refer to a file, I
think it would be fine if it returned FALSE.)
No, but equality for normalizePath() works well enough on most OSe
Dear R community,
i am attempting to use Moran.I for the first time, and am not quite sure on
the inputs needed
i have loaded the ape library.
i have a data frame that includes concentrations of nutrients (no3, nh4,
po4) and the percentage of different land use types (urb, ag, ud, comm, sr,
dp
Is there a function in core R that takes 2 strings and returns TRUE if
they refer to the same file? (If either does not refer to a file, I
think it would be fine if it returned FALSE.)
Compariing inode/device numbers on Unix-like systems and the output of
normalizePath on Windows would probably d
Dear R users,
I would like to ask you for help with coding up. I would like to recreate a
method from a paper of Malcolm et al. (2014) (MALCOLM, I. A., GIBBINS, C.
N., FRYER, R. J., KEAY, J., TETZLAFF, D. & SOULSBY, C. 2014.
The influence of forestry on acidification and recovery: Insights from
l
On Thu, Aug 14, 2014 at 3:47 PM, Sneha Bishnoi wrote:
> Hi All!
>
> I am trying to increment date column of data frame so as to merge it with
> another data frame using sqldf:
> my query is :
> merge<-sqldf("select m.* ,e.* from mdata as m left join event as e on
> date(m.Datest,'+1 day')=e.Start"
You didn¹t say why you want it to return 6 and 4 for times 4 and 12
respectively, so I made an assumption. On that basis, try this example:
mydf <- data.frame(time=c(0,3,9), resp=c(5,6,4))
myint <- approx( mydf$time, mydf$resp, xout=c(6,12),
method='constant', f=0, rule=2)
It r
Hi All!
I am trying to increment date column of data frame so as to merge it with
another data frame using sqldf:
my query is :
merge<-sqldf("select m.* ,e.* from mdata as m left join event as e on
date(m.Datest,'+1 day')=e.Start")
The query returns null for all columns related to event table.
Wh
Dear all.
I am trying to relate daily deaths in a given city with air pollution
values. The model I am using is as follows:
model <- glm(deaths ~ pollution + ns(time, 13) + ns(temp, 7) + ns(rh, 5) +
dow + holiday, family=quasipoisson, data=city)
Where -
deaths: daily number of deaths
pollution:
So for part one it seems you already have your answer.
For part two you should look at time series types like "zoo", with which you
can merge NAs at the new times at which you want "interpolated" answers and use
the na.locf function to fill in values.
?findInterval
-- Bert
Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374
"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
Clifford Stoll
On Thu, Aug 14, 2014 at 9:39 AM, Jaiprasart, Pharavee (HSC)
wrote:
> Hi Bert,
>
> I should have
On Aug 14, 2014, at 9:06 AM, David Winsemius wrote:
>
> On Aug 14, 2014, at 7:17 AM, Jan Stanstrup wrote:
>
>> Thank you very much for this snippet!
>>
>> I used it on my data and indeed it does give intervals which appear quite
>> realistic (script and data here
>> https://github.com/stanst
Hi Bert,
I should have phrased my question differently.
I actually want to do two things.
First is to make a step plot. The "s"/"S" is a typo on my part.
The second is to write a script that when I ask the program for Response of
time == 4, I want it to return "6", or if I ask for response of
On 14/08/2014 17:15, VG wrote:
Hi Everyone,
I am currently using *R version 3.0.0 RC (2013-03-28 r62434) -- "Masked
Marvel"*
I am using Ubuntu 10.04 LTS- the Lucid Lynx.
I downloaded the tar.gz of R 3.1.0 under my Downloads folder.
Why? 3.1.1 is current.
I changed my directory to Download
On Wed, Aug 13, 2014 at 11:57 PM, Peter Brady
wrote:
> Hi All,
>
> I've inherited some R code that I can't work out what they've done. It
> appears to work and give sort of reasonable answers, I'm just trying to
> work out why they've done what they have. I suspect that this is a
> simple vector
Hi,
The G matrix can be constructed from the SVD because GGt is square and
symmetric, so the matrices of the left and right singular values (i.e. U and V)
are the same.
Martyn
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Pete
Your query is a bit unclear, but I suspect
?plot
and a **careful read** about types "s" and "S" therein
would address your problem.
Cheers,
Bert
Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374
"Data is not information. Information is not knowledge. And knowledge
is certainly not
This looks like a variant of the Woodbury formula
http://en.wikipedia.org/wiki/Woodbury_matrix_identity
On Thu, Aug 14, 2014 at 2:57 AM, Peter Brady
wrote:
> Hi All,
>
> I've inherited some R code that I can't work out what they've done. It
> appears to work and give sort of reasonable answers,
Hi Everyone,
I am currently using *R version 3.0.0 RC (2013-03-28 r62434) -- "Masked
Marvel"*
I am using Ubuntu 10.04 LTS- the Lucid Lynx.
I downloaded the tar.gz of R 3.1.0 under my Downloads folder.
I changed my directory to Downloads folder and then used following commands
to install the vers
On Aug 14, 2014, at 7:17 AM, Jan Stanstrup wrote:
> Thank you very much for this snippet!
>
> I used it on my data and indeed it does give intervals which appear quite
> realistic (script and data here
> https://github.com/stanstrup/retpred_shiny/blob/master/retdb_admin/make_predictions_CI_tes
Hi All,
I've inherited some R code that I can't work out what they've done. It
appears to work and give sort of reasonable answers, I'm just trying to
work out why they've done what they have. I suspect that this is a
simple vector identity that I've just been staring at too long and have
forgot
Thank you very much for this snippet!
I used it on my data and indeed it does give intervals which appear
quite realistic (script and data here
https://github.com/stanstrup/retpred_shiny/blob/master/retdb_admin/make_predictions_CI_tests.R).
I also tried getting the intervals with predict.cobs b
Hi all,
I'd like to make a step plot of Time vs Response graph.
This is the example of my data frame - the real data frame has more than a
thousand rows.
Time Duration of infusion Infusion RateResponse
Subtype
0 3
This is what I got:
> x1 <- data.frame(V1=c("K","D","K","M"), V2=c("L","A","M","A"))
> X <- array(0, c(4,4), rep(list(LETTERS[1:4]), 2))
> f(X, x1, badEntryAction="omitRows")
A B C D
A 0 0 0 0
B 0 0 0 0
C 0 0 0 0
D 1 0 0 0
> table(lapply(x1, factor, levels=LETTERS[1:4]))
V2
V1 A B C D
A 0 0
Hi Bill,
sorry for trouble. It did not work both solutions.
Error in `[<-`(`*tmp*`, i, value = 1) : subscript out of bounds
my x matrix is may not have items that x1 has.
say x only has A,B, C, D , whereas x1 has K, L, M , A and D. However
x1 does not have any relationship between B and C thu
You shouldn't need to worry about your system clock (time) for analyzing time
data from files, but only your system timezone. The default value of TZ leads
to assuming system timezone... setting it explicitly changes the assumed
timezone for the purposes of the current instance of R.
I prefer
Hi all,
Thanks all who replied. Arun, Jim and Jeff.
Seems like there are always multiple ways to achieve the same goals with R!
Jim Holtman suggested using the base functions.
Not PLYR or RESHAPE
x <- read.table(text = "Species Location Date Time...
Myochi Chena 5/26/09 18:38
remain
There is a difference between specifying a scale inside the aes or
aes_string functions, and doing it in the arguments to the geom function.
Inside the aes function call it creates a mapping from your input data to
the layer variables, and you do not want to specify strings such as
"Cusum" but
30 matches
Mail list logo