similar to: ggplot not showing all the years on the x-axis

Displaying 20 results from an estimated 2000 matches similar to: "ggplot not showing all the years on the x-axis"

2013 Jan 23
4
how to read a df like that and transform it?
Dear all I have a data.frame like that : father mother num_daughter daughter 291 3906 0 NULL 275 4219 0 NULL 273 4236 1 49410 281 4163 1 49408 274 4226 1 49406 295 3869 2 49403 49404 287 4113 0 NULL 295 3871 1 49401 292 3895 4 49396 49397 49398 49399 291 3900 3 49392 How to read it into R and transform it like that: father mother num_daughter
2013 Jan 07
2
how to aggregate T-test result in an elegant way?
Dear all: Plan 1: I want to do serval t-test means for different variables in a loop , so I want to add all results to an object then dump() them to an text. But I don't know how to append T-test result to the object? I have already plot the barplot and I want to know an elegant way to report raw result. Can anybody give me some pieces of advice? Yao He ????????????????????????? Master
2012 Dec 16
3
how to handle NA values in aggregate()
Dear All: I am trying to calculate four columns' means in a dataframe like this: FID MID IID EW_INCU EW_17.5 EMW EEratio 1 4621 TWF2H5 45.26 NA 15.61 NA 1 4621 TWF2H6 48.02 44.09 13.41 0.3041506 2 4630 TWF2H19 51.44 47.81 NA NA 2 4631 TWF2H21 NA 52.72 16.70
2013 Mar 06
1
Transpose a big data file and write to a new file
Dear all: I have a big data file of 60000 columns and 60000 rows like that: AA AC AA AA .......AT CC CC CT CT.......TC .......................... ......................... I want to transpose it and the output is a new like that AA CC ............ AC CC............ AA CT............. AA CT......... .................... .................... AT TC............. The keypoint is I can't read
2013 Mar 19
2
how to do association study based on mixed linear model
Dear All: I want to do association study based on mixed linear model, My model not only includes serval fixed effects and random effects but also incorporates some covariates such as "birth weight". Otherwise, the size of the data are about 180 individuals and 12 variables and 60000 Fixed effect estimates As asreml-R is not free ,is there any packages for my study? I heard nlme or
2012 Dec 20
2
how to read different files into different objects in one time?
Dear All I have a lot of files in a directory as follows: "02-03.txt" "03-04.txt" "04-05.txt" "05-06.txt" "06-07.txt" "07-08.txt" "08-09.txt" "09-10.txt" "G0.txt" "G1.txt" "raw_ped.txt" .......................... I want to read them into different objects according
2012 Dec 13
2
How to select a subset data to do a barplot in ggplot2
Hi,everybody I have a dataframe like this FID IID STATUS 1 4621 live 1 4628 dead 2 4631 live 2 4632 live 2 4633 live 2 4634 live 6 4675 live 6 4679 dead 10 4716 dead 10 4719 live 10 4721 dead 11 4726 live 11 4728 nosperm 11 4730 nosperm 12 4732 live 17 4783 live 17 4783 live 17 4784 live
2013 Jan 09
4
how to count "A","C","T","G" in each row in a big data.frame?
Dear All I have a data.frame like that: structure(list(name = c("Gga_rs10722041", "Gga_rs10722249", "Gga_rs10722565", "Gga_rs10723082", "Gga_rs10723993", "Gga_rs10724555", "Gga_rs10726238", "Gga_rs10726461", "Gga_rs10726774", "Gga_rs10726967", "Gga_rs10727581", "Gga_rs10728004",
2013 Jan 08
2
how to label two figures in the same chunk independently with knitr
Dear R helpers, I am using knitr to run analysis with R and edit my document with Latex. I am wondering whether there is a way to include 2 or more pictures per chunk and being able to refer them in the text independently and eventually whether it is possible to give them different captions. Let me give you an example.Rnw: \documentclass{article} \title{Example} \author{FS} \begin{document}
2013 Mar 07
2
How to transpose it in a fast way?
Dear all: I have a big data file of 60000 columns and 60000 rows like that: AA AC AA AA .......AT CC CC CT CT.......TC .......................... ......................... I want to transpose it and the output is a new like that AA CC ............ AC CC............ AA CT............. AA CT......... .................... .................... AT TC............. The keypoint is I can't read
2012 Dec 10
3
equivalent of group command of the egen function in Stata
Dear R listers, I am trying to create a new variable that uniquely identifies groups of observations in a dataset. So far I couldn't figure out how to do this in R. In Stata I would simply type: egen newvar = group(dim1, dim2, dim3) Please, find below a quick example to show what I am dealing with: I have a dataset with 4 variables: var <- runif(50) ## a variable that I want to group
2012 Dec 21
2
how to recode an ordered factor
Dear R helpers, I'm trying to recode an ordered factor to reverse its scale, but I can't figure out how to make it. I am using the Recode function provided by the Car package. I've created an ordered variable: data$o.var1 <- ordered(data$var1, levels=c(1,2,3,4), labels =c("very satisfied", "fairly satisfied", "not very satisfied", "not at all
2012 Dec 23
1
Esttab error while exporting regression results
Dear listers, I am trying to export a regression output to a latex document using the R package eststo. I have two variables: an ordered factor: group <- gl(3,5,20, labels=c("Ctl","Trt","prp")) and a continuous variable: weight <- runif(20) I want to regress weight over group, therefore I run: reg1 <- lm(weight ~ group) I wish to include the output of my
2013 Jan 10
1
help with knit_hooks
Dear R-listers, does anybody can suggest some manual where I can learn more about how the hooks in knitr work? I am trying to enclose the output of an R command in the Latex verbatim environment. I defined a hook as follows: knit_hooks$set(fsverb = function(x, options) { paste("\\begin(verbatim)\n", x, "\\end(verbatim)\n", sep = "") } then I set a chunk as
2012 Dec 22
1
how to control the naming of factors in regression
Dear R listers, I am regressing an ordered variable over an ordered independent variable using polr. The output lists every level of the ordered independent variable repeating its name and adding a suffix. In my case my variable is called "o.particip" and in my regression table I get the following: o.particip.L o.particip.Q o.particip.C o.particip^4 o.particip^5 o.particip^6 Is
2011 Oct 12
3
labels in a boxplot
Dear R-listers, I have a little problem with a boxplot and I hope you can help me figuring it out. I'll try to make up some data to illustrate the issue. Sorry, if my procedures look naive, but these are my first steps in R. Any comments and/or suggestions are very welcome. let's create a vector var1: var1 <- rnorm(100) and 5 five logical vectors. In this case the vectors don't
2011 Sep 18
2
troubles with a for loop
Dear all, I am a stata user and I am moving my first steps in R. I am dealing with a silly issue concerning looping over variables. I read previous posts on similar topics in the R help archive, but I did not find a solution. Here is my case: I run a simple bivariate linear regression saving the output in objects called: pd.memb.0, pd.memb.1, pd.memb.2, pd.memb.3 pd.memb.0 <- lm(E.fs.memb ~
2012 Feb 19
2
barplot with more than 1 variable
Dear R listers, I am trying to produce a simple (for a stata user) barplot with 4 countries on the x axis, each country observed in 2 subsequent years and 3 variables. Basically, I should have three bars for each year for each country. I am attaching the chart I made in Stata, but I am not sure you'll manage to see it! I did the following: #here I create the data-set TUSE2. The vectors mw, st
2013 Jan 10
1
how to generate a matrix by an my data.frame
Dear All It is a little hard to give a good small example of my question,so I will show the full data on the bottom and the attachment.Maybe some one could tell me an appropriate way to show it.I'm sorry for the inconvenience. Q:How to generate a 53*53 diagonal matrix by my data Some problems confused me are that: 1.Since it is a diagonal matrix,I have tried to transform col1 and col2 to
2008 Jun 06
4
color scale mapped to B/W
In an R graphic, I'm using cond.col <- c("green", "yellow", "red") to represent a quantitative variable, where green means 'OK', yellow represents 'warning' and red represents 'danger'. Using these particular color names, in B/W, red is darkest and yellow is lightest. I'd like to find color designations to replace yellow and