similar to: Reshape a data set

Displaying 20 results from an estimated 400 matches similar to: "Reshape a data set"

2017 Aug 18
2
R Issues with packages
so I am trying to get my R setup to run this users package. Any help would be great THANKS devtools::install_github(repo = "dadrivr/ffanalytics") I get this devtools::install_github(repo = "dadrivr/ffanalytics") Downloading GitHub repo dadrivr/ffanalytics at master from URL https://api.github.com/repos/dadrivr/ffanalytics/zipball/master Installing ffanalytics
2017 Aug 18
0
R Issues with packages
You just need to READ the error messages and use Google. Don't try to install tcltk. The other two packages are not available through CRAN... they are Bioconductor packages. (Not supported here... use Google.) And learn to post plain text in the future to avoid scrambling what you thought you sent before we see it. Read the Posting Guide. -- Sent from my phone. Please excuse my brevity.
2017 Aug 18
1
R Issues with packages
Thanks Jeff I got the Bioconductor packages installed and tried googling the 65535 tried some things and still get the same error. On Fri, Aug 18, 2017 at 10:59 AM, Jeff Newmiller <jdnewmil at dcn.davis.ca.us> wrote: > You just need to READ the error messages and use Google. > > Don't try to install tcltk. > > The other two packages are not available through CRAN...
2011 Sep 03
2
Change properties of line summary in interaction.plot
Is it possible to change the color/thickness of the summary line in an interaction.plot without changing the other individual data lines? I would like to make the line from the summary function (mean) the color red and thicker than the surrounding black lines. How can I do that? Here is a link to interaction.plot: http://stat.ethz.ch/R-manual/R-patched/library/stats/html/interaction.plot.html
2010 Sep 15
3
Creating publication-quality plots for use in Microsoft Word
Hi everyone, I am trying to make some publication-quality plots for use in Microsoft Word, but I am having trouble creating high-quality plots that are supported by Microsoft Word. If I use the R plot function to create the figure, the lines are jagged, and the picture is not of high quality (same with JPEG(), TIFF(), and PNG() functions). I have tried using the Cairo package, but it distorts
2010 Mar 06
2
Plot interaction in multilevel model
I am trying to plot an interaction in a multilevel model. Here is some sample data. In the following example, it is longitudinal (i.e., repeated measures), so the outcome, score (at each of the three time points), is nested within the individual. I am interested in the interaction between gender and happiness predicting score. id <- c(1,1,1,2,2,2,3,3,3) age <-
2012 Jan 12
1
Keep rows where a variable matches one item of a vector
How do I subset data to only keep those rows of a dataframe where a variable's value matches one item of a vector. For example, how do I keep all of the rows (and all variables) where mydata$id equals one of the values in keepid? See below? mydata <- NULL mydata$id <- 1:30 mydata$value <- seq(from=1,to=100, length.out=30) keepid <- c(6,10,12,13,19,25,26,27,28,29) In other
2009 Nov 11
2
Partial correlations and p-values
I'm trying to write code to calculate partial correlations (along with p-values). I'm new to R, and I don't know how to do this. I have searched and come across different functions, but I haven't been able to get any of them to work (for example, pcor and pcor.test from the ggm package). In the following example, I am trying to compute the correlation between x and y, while
2009 Nov 02
2
convert list to numeric
I would like to preface this by saying that I am new to R, so I would ask that you be patient and thorough, so that I'm not completely clueless. I am trying to convert a list to numeric so that I can perform computations on it (specifically mean-center the variable), but I am running into problems. I have imported the data set into "task" (data frame). The data frame is made of
2011 Feb 20
1
Plotting individual trajectories from individual growth model
Hi all, I am trying to plot the fitted trajectories for each individual from an individual growth model (fit with a linear mixed effects model in lme). How can I plot each person's trajectory in the *same* panel, along with the mean-level trajectory? Below is an image of a plot similar to what I'm trying to create (from: http://jpepsy.oxfordjournals.org/content/31/10/1002/F6.large.jpg):
2011 Sep 07
1
Reshaping data from wide to tall format for multilevel modeling
Hi, I'm trying to reshape my data set from wide to tall format for multilevel modeling. Unfortunately, the function I typically use (make.univ from the multilevel package) does not appear to work with unbalanced data frames, which is what I'm dealing with. Below is an example of the columns of a data frame similar to what I'm working with: ID a1 a2 a4 b2 b3 b4 b5 b6 Below
2012 May 25
1
Correlograms: using boxes and different variables on rows and columns
I'm trying to make correlograms using corrgram. See below for a simple example. #### library(corrgram) data(baseball) vars1 <- c("Assists","Atbat","Errors","Hits","Homer","logSal") vars2 <- c("Putouts","RBI","Runs","Walks","Years")
2012 Feb 23
1
Calculating Pseudo R-squared from nlme
I am fitting individual growth models using nlme (multilevel models with repeated measurements nested within the individual), and I am trying to calculate the Pseudo R-squared for the models (an overall summary of the total outcome variability explained). Singer and Willett (2003) recommend calculating Pseudo R-squared in multilevel modeling by squaring the sample correlation between observed and
2019 May 14
2
[R-pkg-devel] Three-argument S3method declaration does not seem to affect dispatching from inside the package.
CCing r-devel. On Tue, 14 May 2019 at 02:11, Pavel Krivitsky <pavel at uow.edu.au> wrote: > > Dear All, > > I've run into this while updating a package with unfortunately named > legacy functions. It seems like something that might be worth changing > in R, and I want to get a sense of whether this is a problem before > submitting a report to the Bugzilla. > >
2012 Mar 20
1
Remove quotes from a string to use in a variable call
Hi, I have a string that I want to use in a variable call. How can I remove the quotes and/or the string properties of the string to use it in a variable call? Here's an example: library(lme) fm2 <- lme(distance ~ age, data = Orthodont, random = ~ 1) summary(fm2) I want to update the above regression to include new predictors according to what is in a string: predictors <-
2012 Sep 26
1
Interaction scatterplots in ggplot with multiple regression lines
I'm trying to treat a continuous variable as discrete for plotting multiple regression lines in a scatterplot as a function of the level on the moderating variable. In the example below, there is only one regression line plotted to the whole data. I would like a separate regression line for each discrete level of the moderator. The moderator is continuous, so I'd like to treat it as
2012 May 26
1
Plotting interactions from lme with ggplot
I'm fitting a lme growth curve model with two predictors and their interaction as predictors. The multilevel model is nested so that level 1 is time within the individual, and level 2 is the individual. I would like to plot the mean group-level trajectories at plus and minus 1 SD from the mean of the main effects composing the interaction term. Thus, the plot should have 4 lines (mean
2003 Apr 15
5
making a dataframe out of lapply() result
Dear R-helpers, i have a question on how to vectorize this problem: i have a dataframe: tester <- data.frame(groups=c("A","A","B","B","C","C"), one=c(1,1,2,2,3,3), two=c(6,6,7,7,8,8)) # i split it into a list tester.L <- split(tester, tester$groups) # And want to keep only the first item in each: lapply(tester.L, function(x) x
2019 Jun 11
5
[nbdkit PATCH v2] Introduce cacheextents filter
This filter caches the last result of the extents() call and offers a nice speed-up for clients that only support req_one=1 in combination with plugins like vddk, which has no overhead for returning information for multiple extents in one call, but that call is very time-consuming. Quick test showed that on a fast connection and a sparsely allocated 16G disk with a OS installed `qemu-img map`
2005 May 27
4
plotting box plots on same x
I am trying to construct a graph of 6 box plots of blood pressures. I want them to be on a single set of axis and I want the SBP to be ontop of the DBP. I have an array bp with the data in it and I tried a[1,]<-c(145,60,147,62,140,57) a[2,]<-c(160,75,160,74,160,70) a[3,]<-c(140,55,140,65,142,55) boxplot(data.frame(a), main = "Blood Pressures", at=c(1,1,2,2,3,3),