similar to: allowing line wrap for long strip text in xyplot (lattice)

Displaying 20 results from an estimated 6000 matches similar to: "allowing line wrap for long strip text in xyplot (lattice)"

2009 Aug 17
1
how to pass more than one argument to the function called by lapply?
Dear R helpers: I wonder how to pass more than one argument to the function called by lapply. For example, #R code below --------------------------- indf <- data.frame(id=I(c('a','b')),y=c(1,10)) #I want to add an addition argument cutoff into the function called by lapply. outside.fun <- function(indf, cutoff) { unlist(lapply(split(indf, indf[,'id']),
2005 Jan 31
2
coercing a list to a data frame, lists in foreloops
I have a set of time-series climate data with missing entries. I need to add rows for these missing entries to this data set. The only way I know to do this is unsing a foreloop, but this won't work on a list. I've tried to convert the list to a data frame, but that won't happen, either. I want to fill rows in this table: > newtest[10:15,] yrmos yearmo snow.sum snow.mean
2005 Jan 26
1
summarizing daily time-series date by month
Message: 63 Date: Wed, 26 Jan 2005 04:28:51 +0000 (UTC) From: Gabor Grothendieck <ggrothendieck at myway.com> Subject: Re: [R] chron: parsing dates into a data frame using a forloop To: r-help at stat.math.ethz.ch Message-ID: <loom.20050126T052153-333 at post.gmane.org> Content-Type: text/plain; charset=us-ascii Benjamin M. Osborne <Benjamin.Osborne <at> uvm.edu>
2010 Aug 30
4
different interface to by (tapply)?
dear R experts: has someone written a function that returns the results of by() as a data frame? ??of course, this can work only if the output of the function that is an argument to by() is a numerical vector. presumably, what is now names(byobject) would become a column in the data frame, and the by object's list elements would become columns. it's a little bit like flattening the by()
2009 Mar 10
1
Centering multi-line strip text in lattice
I'm having trouble centering multi-line strip text in lattice. As the code below demonstrates bounding box of the text is centered within the strip, but the first line isn't centered in relation to the longer second line. The "adj" argument to par.strip.text doesn't seem to do much. Suggestions? a=data.frame( x=rep(1:10,2) ,y=rep(1:10,2) ,z=rep(c('First Line\nLonger
2005 Jan 25
1
chron: parsing dates into a data frame using a forloop
I have one data frame with a column of dates and I want to fill another data frame with one column of dates, one of years, one of months, one of a unique combination of year and month, and one of days, but R seems to have some problems with this. My initial data frame looks like this (ignore the NAs in the other fields): > mans[1:10,] date loc snow.new prcp tmin snow.dep tmax 1
2010 May 06
1
question about rolling regressions
Hi All, I am using R 2.11.0 on a Ubuntu machine. I have a time series data set and want to run rolling regressions with it. Any suggestions would be useful. Here are the details: (1) I convert relevant variables into time series objects and compute first differences: vad <- ts(data$ALLGVA/data$GDPDEF, start=1948, frequency=1) emp <- ts(data$ALLEMP, start=1948, frequency=1) vad.dif1 <-
2009 Nov 27
1
problem with "dynformula" from "plm" package [RE-POST]
Hello list, I'm following the paper (http://www.jstatsoft.org/v27/i02/paper) on how to use "plm" to run panel regressions, and am having trouble with what I believe should be something very basic. When I run the command (p.9 in the paper): R> dynformula(emp~wage+capital,log=list(capital=FALSE,TRUE),lag=list(emp=2,c(2,3)),diff=list(FALSE,capital=TRUE)) I see: emp ~ wage +
2010 Jan 25
3
Issue using tapply
Hello all, I am trying to use the tapply function to sum some values and change the column names of the resulting vector. I input Emp Et 1 10565 ACC 2 7515 ADM 3 625 AGF 4 6243 CNS 5 12721 EDU 6 3924 FIN 7 18140 HLH 8 3686 INF 9 15841 MFG 10 243 MIN 11 1864 MNG 12 4664 OSV 13 5496 PRF 14 4988 PUB 15 2166 REC 16 2153 REL 17 16082 RTL 18 3582 TRN 19 757 UTL 20
2005 Mar 08
1
To convert an adjacency list model into a nested set model
Dear R-help I am wondering if somebody wrote some code to convert an adjacency list model into a nested set model. In principal I want to do the same as John Celko mentioned it here with SQL: http://groups.google.co.uk/groups?hl=en&lr=lang_en&selm=8j0n05%24n31%241 %40nnrp1.deja.com Assume you have a tree structure like this Albert / \ /
2011 Aug 16
3
Text wrap
Hi everyone. I have a long label that I would like to split. I found that I could use "strwrap" for simple text. However, this is not working with this label: str = expression(paste("< 20 ?m phytoplankton ","(cells ? ",mL^-1,")")) plot(...., ylab = strwrap(str,20),...) I suspect this is because I'm using "expression" for form my label.
2011 Feb 02
2
Efficient way to determine if a data frame has missing observations
I have a data set covering a large number of cities with values for characteristics such as land area, population, and employment. The problem I have is that some cities lack observations for some of the characteristics and I'd like a quick way to determine which cities have missing data. For example:
2003 Jun 18
2
Forward stepwise procedure w/ stepAIC
I'm attempting to select a model using stepAIC. I want to use a forward selection procedure. I have specified a "scope" option, but must not be understanding how this works. My results indicate that the procedure begins and ends with the "full" model (i.e., all 17 independent variables)...not what I expected. Could someone please point out what I'm not
2005 Apr 15
2
abbreviate or wrap dimname labels
For a variety of displays (mosaicplots, barplots, ...) one often wants to either abbreviate or wrap long labels, particularly when these are made up of several words. In general, it would be nice to have a function, abbreviate.or.wrap <- function(x, maxlength=10, maxlines=2, split=" ") { } that would take a character vector or a list of vectors, x, and try to abbreviate or wrap
2012 Apr 27
1
Wrap names.arg text in barplot
Hello! Does anyone know of a handy way to wrap the names.arg text in a barplot? I'm creating a bar plot with rather long labels; I can adjust the margins, but I'd also like to have the text wrap to about 4cm. Thanks! Kyle H. Ambert Doctoral Candidate, Bioinformatics Oregon Health & Science University ambertk@gmail.com [[alternative HTML version deleted]]
2016 Jun 24
3
Ayuda ggplot2
Hola a todos! Soy nueva en R y necesito hacer unos gráficos para una investigación, he explorado un poco y estoy intentando usar ggplot2 ya que hace gráficos de muy buena calidad...tengo los datos de varios años para diferentes grupos de empresas y los pretendo graficar tanto en un solo grafico como en varios (facet_wrap) pero tengo problemas con el eje de las X, ya que necesito que aparezcan los
2011 Sep 08
8
acts_as_solr problem ActsAsSolr::SearchResults:
hi, i am using acts_as_solr plugin when i tried with search by def search puts "#####################" # ids = params[:name] @id = params[:query] @emp = Employee.find_by_solr(@id) puts "------------------------------#{@emp}" respond_to do |format| format.html{render :action => ''search''} format.xml end
2009 Oct 19
1
How do I wrap a long mixed text/math expression in an axis label?
I would like to wrap a y-axis label onto two lines. My label is an expression containing both text and math symbols. I have looked at plotmath, strsplit(), strwrap(), deparse(), do.call(), substitute() and bquote(). Based on previous posts, I can get plain text to wrap. However, when I try these methods on my label, the exact string is returned, rather than evaluating the math symbols. My
2007 Aug 04
1
ActiveRecord gotcha with references?
I have this situation: class Employee < ActiveRecord::Base belongs_to :designation end class Designation < ActiveRecord::Base end I do the following at the irb console: Step 1: Find an employee >> emp = Employee.find 3 => #<Employee:0x35a7d34 @attributes={"designation_id"=>"3", "id"=>"3",
2010 Jul 13
2
Wrap column headers caption
Hi: Using this dataframe with quite long column headers, how can I wrap the text so that the columns are narrower. I was trying to use strwrap without success. Thanks reportDF <- structure(list(IDDate = c("3/12/2010", "3/13/2010", "3/14/2010", "3/15/2010"), FirstRunoftheYear = c("33 (119 ? 119)", "n (0 ? 0)", "893 (110 ?