Displaying 20 results from an estimated 1000 matches similar to: "Nested if help"
2017 Jun 16
2
Varios gráficos en una vista en OpenAir
Funciona perfecto!
Gracias Carlos.
Atte.
Novvier Uscuchagua
De: Carlos Ortega [mailto:cof en qualityexcellence.es]
Enviado el: viernes, 16 de junio de 2017 13:46
Para: Novvier Marco Uscuchagua Cornelio <novvier en outlook.com.pe>
CC: r-help-es en r-project.org
Asunto: Re: Varios gráficos en una vista en OpenAir
Hola,
Prueba entonces esto, que sí que funciona...
#-----------------------
2007 Jan 19
4
Newbie question: Statistical functions (e.g., mean, sd) in a "transform" statement?
Greetings listeRs -
Given a data frame such as
times
time1 time2 time3 time4
1 70.408543 48.92378 7.399605 95.93050
2 17.231940 27.48530 82.962916 10.20619
3 20.279220 10.33575 66.209290 30.71846
4 NA 53.31993 12.398237 35.65782
5 9.295965 NA 48.929201 NA
6 63.966518 42.16304 1.777342 NA
one can use "transform" to
2017 Jun 16
2
Varios gráficos en una vista en OpenAir
Hola Carlos,
Me parece que timePlot genera los gráficos en un formato diferente.
Al ejecutar grid.arrange genera el siguiente error:
Error in gList(list(list(plot = list(formula = value ~ date | default, :
only 'grobs' allowed in "gList"
Gracias.
Atte.
Novvier Uscuchagua
De: Carlos Ortega [mailto:cof en qualityexcellence.es]
Enviado el: viernes, 16 de junio de 2017 12:38
2007 Dec 16
4
improving a bar graph
Hello,
Below is the code for a basic bar graph. I was seeking advice
regarding the following:
(a) For each time period there are values from 16 people. How I can
change the colour value so that each person has a different colour,
which recurs across each of the three graphs/tie epriods?
(b) I have seen much more sophisticated examples using lattice (e.g
each person has a separate
2012 Nov 30
1
help on "stacking" matrices up
Dear All,
#I have the following code
Dose<-1000
Tinf <-0.5
INTERVAL <-8
TIME8 <-matrix(c((0*INTERVAL):(1*INTERVAL)))
TIME7 <-matrix(c((0*INTERVAL):(2*INTERVAL)))
TIME6 <-matrix(c((0*INTERVAL):(3*INTERVAL)))
TIME5 <-matrix(c((0*INTERVAL):(4*INTERVAL)))
TIME4 <-matrix(c((0*INTERVAL):(5*INTERVAL)))
TIME3 <-matrix(c((0*INTERVAL):(6*INTERVAL)))
TIME2
2010 May 20
1
Strange behaviour when using diff with POSIXt and POSIXlt objects
Dear list,
I´m calculating time differences between series of time stamps and I noticed
something odd:
If I do this...
> time1=strptime("2009 05 31 22 57 00",format="%Y %m %d %H %M")
> time2=strptime("2009 05 31 23 07 00",format="%Y %m %d %H %M")
>
> diff(c(time1,time2),units="mins")
Time difference of 10 mins
.. I get the correct
2005 Nov 15
1
Repeates Measures MANOVA for Time*Treatment Interactions
Dear R folk,
First off I want to thank those of you who responded with comments for
my R quick and dirty stats tutorial. They've been quite helpful, and
I'm in the process of revising them. When it comes to repeated
measures MANOVA, I'm in a bit of a bind, however. I'm beginning to see
that all of the documentation is written for psychologists, who have a
slightly
2011 Aug 17
1
contrast package with interactions in gls model
Hi!
I try to explain the efffect of (1) forest where i took samples's soils (*
Lugar*: categorical variable with three levels), (2) nitrogen addition
treatments (*Tra*: categorical variable with two levels) on total carbon
concentration's soil samples (*C: *continue* *variable) during four months
of sampling (*Time:* categorical and ordered variable with four levels).
I fitted the
2012 Apr 15
2
xyplot type="l"
Probably a stupidly simple question, but I wouldn't know how to google it:
xyplot(neuro ~ time | UserID, data=data_sub)
creates a proper plot.
However, if I add
type = "l"
the lines do not go first through time1, then time2, then time3 etc but in
about 50% of all subjects the lines go through points seemingly random
(e.g. from 1 to 4 to 2 to 5 to 3).
The lines always start at time
2010 Aug 18
2
Different way of aggregating
Hi
Usually "aggregate" is used to calculate things such as the sum of all data
on the first day, the sum next day, and so on.
But how can I calculate the mean of the first hour of all days, the mean of
the second hour of all days, and so on. ???
That's
Most examples:
today at 1am + today at 2am + today at 3am +.... -> sum
today
tomorrow at 1am + tomorrow at
2005 Aug 10
2
Treatment-response analysis along time
Dear R people,
I wonder if you could give me a hand with some of my data. I have a very
typical analysis in biology, however it is difficult for me to find the
right way to analyse. I had a group of animals, I gave them a treatment, and
I measure a variable along time -one??s per day- along 5 days,for
example(fake data):
Animals Time1 Time2 Time3 Time4
1 1 5 3
2012 Mar 28
3
Connect lines in a dot plot on a subject-by-subject basis
I am trying to plot where data points from a give subject are connected by a line. Each subject is represented by a single row of data. Each subject can have
up to five observations. The first five columns of mydata give the time of observation, columns 6-10 give the values at each time point. Some subjects have
all data, some are missing values.
The code I wrote to draw the plot is listed below.
2004 Jul 04
2
Random intercept model with time-dependent covariates, results different from SAS
Dear list-members
I am new to R and a statistics beginner. I really like the ease with which I can
extract and manipulate data in R, and would like to use it primarily. I've
been learning by checking analyses that have already been run in SAS.
In an experiment with Y being a response variable, and group a 2-level
between-subject factor, and time a 5-level within-subject factor. 2
2012 Aug 07
1
lm with a single X and step with several Xi-s, beta coef. quite different:
Hi, (R version 2.15.0)
I am running a pgm with 1 response (earlier standardized Y) and 44
independent vars (Xi) from the same data =a2:
When I run the 'lm' function on single Xi at a time, the beta
coefficient for let's say X1 is = -0.08 (se=0.03256)
But when I run the same Y with 44 Xi-s with the 'step' function (because
I left direction parameter empty, I assume a backward
2011 May 01
1
Mean/SD of Each Position in Table
I have 100+ .csv files which have the basic format:
> test
X Substance1 Substance2 Substance3 Substance4 Substance5
1 Time1 10 0 0 0 0
2 Time2 9 5 0 0 0
3 Time3 8 10 1 0 0
4 Time4 7 20 2 1 0
5 Time5
2007 May 13
2
Some questions on repeated measures (M)ANOVA & mixed models with lme4
Dear R Masters,
I'm an anesthesiology resident trying to make his way through basic
statistics. Recently I have been confronted with longitudinal data in
a treatment vs. control analysis. My dataframe is in the form of:
subj | group | baseline | time | outcome (long)
or
subj | group | baseline | time1 |...| time6 | (wide)
The measured variable is a continuous one. The null hypothesis in
2002 Aug 10
0
lme output
Hi,
I am having difficulty understanding some lme output -- I haven't found too
many examples to help explain to me how to interpret the coefficients and would
appreciate any help.
I am fitting a model:
fit <- lme(y ~ pre + group + time + group:time, random=~1|subject,
na.action=na.omit, data=mydata)
...for a dataset where there are two groups being followed over time. pre is
2006 Jan 19
1
Minimizing mahalanobis distance to negative orthant
Hi
I have the following problem: given x (px1) and S (pXp positive definite), find y such that y_i<=0 (i=1..p) minimizing the
mahalanobis distance (x-y)'S^{-1}(x-y).
Has anyone worked on this problem? Tips or R code would be appreciated.
David
____________________
David Edwards
Principal scientist
Biostatistics
Novo Nordisk A/S
Novo Allé
2880 Bagsvaerd
Denmark
+45 4444 8888 (phone)
2008 Oct 29
2
call works with gee and yags, but not geepack
I have included data at the bottom of this email. It can be read in by
highlighting the data and then using this command: dat <-
read.table("clipboard", header = TRUE,sep="\t")
I can obtain solutions with both of these:
library(gee)
fit.gee<-gee(score ~ chem + time, id=id,
family=gaussian,corstr="exchangeable",data=dat)
and
library(yags)
fit.yags <-
2016 Dec 08
3
wish list: generalized apply
Dear All,
I regularly want to "apply" some function to an array in a way that the arguments to the user function depend on the index on which the apply is working. A simple example is:
A <- array( runif(160), dim=c(5,4,8) )
x <- matrix( runif(32), nrow=4, ncol=8 )
b <- runif(8)
f1 <- function( A, x, b ) { sum( A %*% x ) + b }
result <- rep(0.0,8)
for (i in 1:8) {