Displaying 20 results from an estimated 9000 matches similar to: "Can somebody help me with following data manipulation?"
2009 Nov 26
1
lattice --- different properties of lines corresponding to type=c("l", "a") respectively
I think the subject says it all. I want to make a simple lattice plot,
using xyplot with the
argument type=c("l","a").
The problem then is that in the resulting plot it is
difficult/impossible to see which plot corresponds to the average
and which to the individual profiles. I triedthings like extra
arguments lwd=c(1,3) or col=c("blue","red")
hoping
2024 Oct 17
2
DPLYR Multiple Mutate Statements On Same DataFrame
Hi R Helpers,
I have been looking for an example of how to execute different dplyr mutate statements on the same dataframe in a single step. I show how to do what I want to do by going from df0 to df1 to df2 to df3 by applying a mutate statement to each dataframe in sequence, but I would like to know if there is a way to execute this in a single step; so simply go from df0 to df1 while executing
2024 Oct 18
1
DPLYR Multiple Mutate Statements On Same DataFrame
?s 22:50 de 17/10/2024, Sparks, John escreveu:
> Hi R Helpers,
>
> I have been looking for an example of how to execute different dplyr mutate statements on the same dataframe in a single step. I show how to do what I want to do by going from df0 to df1 to df2 to df3 by applying a mutate statement to each dataframe in sequence, but I would like to know if there is a way to execute this
2008 Aug 26
1
processing subset lists and then plot(density())
d <- structure(list(Site = structure(c(8L, 12L, 7L, 6L, 11L, 5L, 10L,
4L, 3L, 2L, 1L, 9L, 8L, 12L, 7L, 6L, 11L, 5L, 10L, 4L, 3L, 2L,
1L, 9L, 8L, 12L, 7L, 6L, 11L, 5L, 10L, 4L, 3L, 2L, 1L, 9L, 8L,
12L, 7L, 6L, 11L, 5L, 10L, 4L, 3L, 2L, 1L, 9L, 8L, 12L, 7L, 6L,
11L, 5L, 10L, 4L, 3L, 2L, 1L, 9L, 8L, 12L, 7L, 6L, 11L, 5L, 10L,
4L, 3L, 2L, 1L, 9L, 8L, 12L, 7L, 6L, 11L, 5L, 10L, 4L, 3L, 2L,
1L, 9L,
2009 May 15
1
data summary and some automated t.tests.
I would like to preform a t.test to each of the measured variables
(sand.silt etc.) with a mean and sd for each of the treatments (up or
down), and out put this as a table.... I am having a hard time
starting- maybe it is to close to lunch. Any suggestions would be
greatly appreciated.
Stephen Sefick
x <- (structure(list(sample. = structure(c(1L, 7L, 8L, 9L, 10L, 11L,
12L, 13L, 14L, 2L, 3L,
2010 Jul 02
2
Problem with aggregating data across time points
Hello-
I have a dataset which basically looks like this:
Location Sex Date Time Verbal Self harm
Violence_objects Violence
A 1 1-4-2007 1800 3 0
1 3
A 1 1-4-2007 1230 2 1
2 4
D 2 2-4-2007 1100 0
2011 Jun 13
1
Heatmap in R and/or ggplot2
I have a dataframe df with columns x, y, and height. I want to create a
heatmap-like plot that creates a grid of x by y, and then color codes the
grid depending on the value of height.
Is there a ggplot2 object to do this? I'm able to easily do this in Excel
with pivot tables and conditional formatting so I'm including an image that
is close to the output I want. I want to be able to
2011 Feb 19
1
problem in plotting numeric x by POSIXt class with lattice
# hi all,
# I'm trying to plot temperatures by date in a trellis plot by their
stations
# I'm plotting the following data.frame
library(lattice)
h <- structure(list(station_name = structure(c(3L, 4L, 2L, 10L, 11L,
12L, 6L, 7L, 5L, 8L, 9L, 3L, 4L, 2L, 10L, 11L, 12L, 6L, 7L, 5L,
8L, 9L, 3L, 4L, 2L, 10L, 11L, 12L, 6L, 7L), .Label = c("Ashqelon",
"Beer Sheva",
2018 Apr 23
4
R 3.5.0 fails its regression test suite on Linux/x86_64
Hi,
I just tried to upgrade Nixpkgs to R 3.5.0, but unfortunately the new
version fails its regression test suite. We configure the build using
the flags "--without-recommended-packages", in case that's relevant. You
can see a complete build log with all relevant information at [1].
Anyway, the test failures look like this:
| make[3]: Entering directory
2018 May 17
0
Bilateral matrix
Dear William and Ben,
Thank you for your replies and elegant solutions. I am having trouble with
the fact that two of the previous locations do not appear in current
locations (that is no one moved to OKC and Dallas from other cities), so
these two cities are not being included in the output.
I have provided a better sample of the data and the ideal output (wide form
- a 10x10 bilateral matrix)
2012 Mar 14
1
Questing on fitting Baseline category Logit model
Dear all,
I am facing some problem with how to fit a "Baseline category Logit
model" with R. Basically I am considering famous "Alligator" data as
discussed by Agresti. This data can also be found here:
https://onlinecourses.science.psu.edu/stat504/node/174
(there is also an accompanying R file, however the underlying R code
could not load the data properly!!!)
Below are
2017 Oct 20
1
Error messages using nonlinear regression function (nls)
Hi
Keep your messages in the list, you increase your chance to get some answer.
I changed your data to groupedData object (see below), but I did not find any problem in it.
plot(wlg)
gives reasonable picture and I am not such expert to see any problem with data. Seems to me, that something has to be wrong with nlsList function.
> wheat.list <- nlsList(Prop ~ SSlogis(end,Asym, xmid,
2011 Feb 04
1
read.table error
R experts,
I am working with a fairly large data set comprised of 563 rows by 116 columns including several
different modes. I have been unable to read in the data set completely using the read.table
function and the RGui (i.e. nearly half the total number of rows are missing from the data set
along with the column names). The data does read in fully using Tinn-R's Rterm;
however, at several
2016 Apr 22
1
Unique Ordering
Hi R-Help,
data at bottom
I've been struggling with a problem where I need to order based on 1) the
Frequency "Freq" and 2) keeping each group of 3 of the same type together
"Var2" but I want across all groups it to go "high to low" based on the
earn factor.
Thank you!
structure(list(Var1 = structure(c(1L, 3L, 2L, 1L, 2L, 3L, 1L,
3L, 2L, 3L, 1L, 2L, 3L, 1L,
2013 Apr 07
3
mlogit error
Dear List
I am trying to fit a multinomial model using the mlogit package. Attempting to load
the data into mlogit presents the following error.
MLOG<-mlogit.data(Mult3,shape="long",choice="CHOICE",alt.var="mode.ids",indivs = "set3",chid.var = "obs")
Error in `row.names<-.data.frame`(`*tmp*`, value = c("1.1", "1.2",
2012 Jan 09
3
as.numeric() generates NAs inside an apply call, but fine outside of it
Hello-
I have rather a messy SPSS file which I have imported to R, I've dput'd
some of the columns at the end of this message. I wish to get rid of all
the labels and have numeric values using as.numeric. The funny thing is
it works like this:
as.numeric(mydata[,2]) # generates correct numbers
however, if I pass the whole dataframe at once like this:
apply(mydata, 1:2, function(x)
2013 Jan 31
2
glm poisson and quasipoisson
Hello,
I have a question about modelling via glm. I have a dataset (see dput)
that looks like as if it where poisson distributed (actually I would
appreciate that) but it isnt because mean unequals var.
> mean (x)
[1] 901.7827
> var (x)
[1] 132439.3
Anyway, I tried to model it via poisson and quasipoisson. Actually, just to
get an impression how glm works. But I dont know how to
2017 Nov 07
1
fill histogram in ggplot
Hi all,
I have the following data and I have a histogram for mms like
ggplot(hist,aes(x=hist$mms))+ geom_histogram(binwidth=1,fill="white",color="black")and then I want to fill the color of histogram by probable=1 and probable=0, could anyone help me in this?
My data:
structure(list(probable = c(1L, 0L, 1L, 1L, 0L, 1L, 0L, 1L, 1L,
0L, 1L, 0L, 1L, 0L, 1L, 0L, 1L, 1L,
2018 Jan 30
2
Could the Odds represent weight in Generalized Linear Model?
Hello all,
I'm sorry if my question seems basic.
Im studying a responses (Yes,No) in a survey and, thanks to GLM I obtain
the following relation with my variables : (Yes,No)~ ?0 + Age We note this
this certain type of (Yes,No) response is linked to age (p<0.05 in glm) .
After that we calculated :
model1=glm(cbind(Yes,No) ~ Age + Times + Type, family=binomial)
summary(model1)
2010 Feb 09
1
Missing interaction effect in binomial GLMM with lmer
Dear all,
I was wondering if anyone could help solve a problem of a missing interaction effect!!
I carried out a 2 x 2 factorial experiment to see if eggs from 2 different locations (Origin = 1 or 2) had different hatching success under 2 different incubation schedules (Treat = 1 or 2). Six eggs were taken from 10 females (random = Female) at each location and split between the treatments,