similar to: ggplot2 X axis levels

Displaying 14 results from an estimated 14 matches similar to: "ggplot2 X axis levels"

2010 Aug 30
2
reordering levels error
Please consider the following dataset: I want to reorder the levels by year but get the following error: Error in tapply(v, x, FUN, ...) : arguments must have same length ? I suspect that I need to add the levels before I melt the dataset ?but either way I have only use 'reorder' once before and can't figure ?out how it works..Thanks for any advice. ? winter <- (list(week = c(26L,
2006 Nov 15
1
dynamic aggregation of many variables
Hi, i have many variables for in example 4weeks and want to do aggregations, like mean standard , deviation etc.. With mean it works but how i can calculate the standard deviation for the 4weeks and for every ID. many thanks & regards, christian week1 <- grep("(_PRO_001)",names(dmx3),perl=T) week1table <- subset(dmx3,select=c(ID,week1)) week2 <-
2007 Jul 23
3
Aggregate daily data into weekly sums
Dear Lest, I have a two-variable data frame as follows (the time peirod of the actual data set is 10 years): Date Amount 1 6/1/2007 1 2 6/1/2007 1 3 6/4/2007 2 4 6/5/2007 2 5 6/11/2007 3 6 6/12/2007 3 7 6/12/2007 3 8 6/13/2007 3 9 6/13/2007 3 10 6/18/2007 4 11 6/18/2007 4 12 6/25/2007 5 13 6/28/2007 5
2013 Jan 04
2
Can you help me please
HI Fares, You could try this: dat1<- read.table(text=" date????? donation 3jan2003?? 20235 4jan2003?? 25655 5jan2003?? 225860 6jan2003?? 289658 7jan2003?? 243889 8jan2003?? 244338 9jan2003?? 243889 ",sep="",header=TRUE,stringsAsFactors=FALSE) The post is not very specific as to what you need.? I hope this works for you. library(xts)
2012 Jul 10
2
estimation of NA by predict command
Dear arun and all R users, I will first of all try to simply define my issue.. I have data in the following format Year Discharge dd/mm/yyyy x .. … … … There are some NA values in the discharge which I would like to predict by using “predict command”. I cant figure out the way to write the coding for that. Could you please help me on that??? I have also ,written
2010 Jun 18
0
pcse package - is it OK to use it when my regression is weighted by each subgroup's mean
Hello! Just would like to make sure I am not doing something wrong. I am running an OLS regression. I have several subgroups in the data set (locations) - and in each location I have weekly data for 2 years - on my DV and on all predictors. Looks like this: location week DV Predictor1 Predictor 2 location1 week1 xxx xxxxxxx xxxxxxxxx location1 week2 xxx xxxxxxx xxxxxxxxx . .
2010 Apr 07
1
finding weekly average...
Hi All, I have a time series data with two continuous variables (say Var1 and Var2) for 4 years (***not continuous, do have some breaks because of missing data***). Something like this: Date Var1 Var2 12/01/2004 7 0 12/01/2004 0 0 12/01/2004 0 7 12/01/2004 7 0 12/01/2004 0 7 12/01/2004 0 7 12/02/2004 0 0 ... I need to find out weekly average of var1 and var2, so that I end up with data like:
2010 Jan 12
2
optimization challenge
I have a challenge that I want to share with the group. This is not homework (but I may assign it as such if I teach the appropriate class again) and I have found one solution, so don't need anything urgent. This is more for fun to see if others can find a better solution than I did. The challenge: I want to read a book in a given number of days. I want to read an integer number of
2007 Apr 25
1
prelim.norm() function not working
R-experts: I am trying to reproduce some of Paul Allison's results in his little green book on missing data (Sage 2002). The dataset for which I am having problems, "usnews", can be found at: http://www.ats.ucla.edu/stat/books/md/default.htm. I am working on a Windows machine with R 2.5 installed, all packages up-to-date. The problem has to do with the prelim.norm() function of the
2010 Dec 13
2
Complicated nls formula giving singular gradient message
I'm attempting to calculate a regression in R that I normally use Prism for, because the formula isn't pretty by any means. Prism presents the formula (which is in the Prism equation library as Heterologous competition with depletion, if anyone is curious) in these segments: KdCPM = KdnM*SpAct*Vol*1000 R=NS+1 S=(1+10^(X-LogKi))*KdCPM+Hot a=-1*R b=R*S+NS*Hot+BMax c = -1*Hot*(S*MS+BMax) Y
2012 Oct 29
4
replace repeated id in a pedigree list
Hello, I have a pedigree file such this: FAMID ID FA ID MO ID SEX STATUS 1 1 0 0 2 0 1 2 3 1 2 2 1 4 3 1 1 2 1 5 3 1 1 0 1 6 3 1 1 0 1 7 3 1 2 2 1 8 3 1 1 0 1 9 3 1 1 0 1 10 3 1 2 0 1 11 3 1 1 0 1 3 0 0 1 0 2 12 13
2010 Apr 20
5
Assigning Week Numbers
R experts, How could I extract the week number from a date vector (in Date class) such that week numbering (week 1...2...) begins (May 01) and ends (October 31) on the same specific dates each year? Week numbering must conform to the following day numbering format (Sat=1,Sun=2,Mon=3.....Fri=7). This means that new weeks must begin on Saturdays, and end on Fridays (except for the first date
2012 Aug 22
1
Error in if (n > 0)
I've searched the Web with Google and do not find what might cause this particular error from an invocation of cenboxplot: cenboxplot(cu.t$quant, cu.t$ceneq1, cu.t$era, range=1.5, main='Total Recoverable Copper', ylab='Concentration (mg/L)', xlab='Time Period') Error in if (n > 0) (1L:n - a)/(n + 1 - 2 * a) else numeric() : argument is of length zero I do
2008 Aug 01
0
multinomRob: Error in eigen [..] infinite or missing values in 'x'
I'm interested in analysing some of my data using multinomial regression. I have been using nnet's multinom so far. However, I found that some of the data shows overdispersion and hence want to change to robust multinomial regression, package: multinomRob I have succesfully implemented Agresti's (2002) alligator example (chapter 7, p 268) using the option MLEonly=TRUE as there are too