Re: [R] determine size (width and height) of a graphics file via R - how?

2012-06-20 Thread Mark Heckmann
;, invisible = FALSE) > > to make sure it actually shows you the result. > > EBImage is an R interface to imagemagick but is probably more trouble > than it's worth for the simple task you're trying to do. > > Hope this helps, > Ethan > > On Sun, May 13, 2

[R] using rcom to control Power Point - problem to set a property

2012-05-14 Thread Mark Heckmann
# does not work shp[["Adjustments"]]$Item(1) # does not work shp[["Adjustments"]]$Item(1) <- .9 # does not work -> error Does someone why this is the case or what I am doing wrong? Thanks ! Mark Mark Heckmann Blog: www.mar

[R] determine size (width and height) of a graphics file via R - how?

2012-05-13 Thread Mark Heckmann
determine the size of the original graphic before adding it to a slide. Mark Heckmann Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com [[alternative HTML version deleted]] __ R-help@r

[R] Sweave UFT8 problem

2012-04-14 Thread Mark Heckmann
Hi, I work on MacOS, trying to Sweave an UFT8 document. AFAI remember R 2.14 used to render a warning when the encoding was not declared when using Sweave. With R 2.15 it seems to render an error. Sweave("sim_pi.Rnw") Error: 'sim_pi.Rnw' is not ASCII and does not declare an encoding Declaring an

Re: [R] assigment operator question

2012-04-07 Thread Mark Heckmann
I was thinking about an invisible object in the global environment and using <<- or assign() to change the settings... What other roads are there to go? TIA --Mark Am 07.04.2012 um 22:51 schrieb Henrik Bengtsson: > On Sat, Apr 7, 2012 at 1:30 PM, Mark Heckmann wrote: >> Hel

[R] assigment operator question

2012-04-07 Thread Mark Heckmann
noch understand why the above does not work. The object l is in the global environment. Can someone explain it to me? Thanks --Mark Mark Heckmann Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com __ R-hel

[R] qtbase installation problems on MacOS

2012-03-17 Thread Mark Heckmann
eworks/QtWebKit.framework/Versions/4/QtWebKit Expected in: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation Fehler: Laden fehlgeschlagen Ausführung angehalten Fehler: Laden fehlgeschlagen * removing ‘/Library/Frameworks/R.f

Re: [R] "figure margins too large" in RGtk2 drawing area as cairo device - why?

2012-03-09 Thread Mark Heckmann
asCairoDevice(da) [1] TRUE > win$add(da) > Sys.sleep(.1) > plot(1:10) > par(c("din", "mai")) $din [1] 2.78 2.78 $mai [1] 0.7791667 0.6263889 0.6263889 0.3208333 Thanks in advance --- Mark Am 09.03.2012 um 00:01 schrieb peter dalgaard:

Re: [R] "figure margins too large" in RGtk2 drawing area as cairo device - why?

2012-03-08 Thread Mark Heckmann
$cra [1] 7 11 $oma [1] 0 0 0 0 > plot(1:10) Fehler in plot.new() : Grafikränder zu groß ###ERROR### Thanks Mark Am 08.03.2012 um 22:48 schrieb peter dalgaard: > > On Mar 8, 2012, at 20:27 , Mark Heckmann wrote: > >> When using a gtkDrawingArea as a Cairo device I very oft

[R] "figure margins too large" in RGtk2 drawing area as cairo device - why?

2012-03-08 Thread Mark Heckmann
Fehler in plot.new() : Grafikränder zu groß Any ideas? Thanks in advance. --Mark PS. My system: R version 2.14.1 (2011-12-22) Platform: i386-apple-darwin9.8.0/i386 (32-bit) MacOS 10.6 Mark Heckmann Blog: www.markheckmann.de R-Blog: http://ryouready.wordpre

Re: [R] changing the drawing context using Cairo and RGtk2

2012-03-07 Thread Mark Heckmann
tkDrawingArea object has no real knowledge that it is being > used as a graphics device. You could do something like: stick the device ID > on da1/da2 as an attribute, and then have a function that does dev.set with > that attribute. > > Michael > > On Mon, Mar 5, 2012

[R] transfer local function objects to other environment - how?

2012-03-07 Thread Mark Heckmann
: foo <- function(){ x <- 1 y <- 2 } env <- new.env() Now I want to evaluate foo() but have the local variables x and y appear in env. Thanks ---Mark –––– Mark Heckmann Blog: www.markheckmann.de R-Blog: http://ryouready.w

[R] changing the drawing context using Cairo and RGtk2

2012-03-05 Thread Mark Heckmann
:10) THX --Mark –––– Mark Heckmann Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-p

[R] no partial matching of argument names after dots argument - why?

2012-03-05 Thread Mark Heckmann
lain me the reason for this behavior? THX Mark –––– Mark Heckmann Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEA

[R] function to create Pango markup?

2011-12-27 Thread Mark Heckmann
Im am looking for a function to create Pango markups (by e.g. passing a string and a set of Pango markup attributes like color etc.) Is there a function that will do this? Thanks! Mark Heckmann Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com

[R] RGtk2: How to overlay a gtkDrawingArea with a button or any other widget?

2011-12-21 Thread Mark Heckmann
d() da <- gtkDrawingArea() fx$put(da, 100, 100) asCairoDevice(da) par(mar=c(0,0,0,0)) plot(1:10) btn.1 <- gtkButton("button") fx$put(btn.1, 200, 200) w$add(fx) Thanks Mark –––– Mark Heckmann Blog: www.markheckmann.de R-Blog: http://r

[R] gWidgets: how to remove that is box drawn when moving the mouse with pressed button

2011-12-18 Thread Mark Heckmann
sponding line in the code to implement that. library(gWidgets) options("guiToolkit"="RGtk2") w <- gwindow() g <- ggraphics(cont=w) par(mar=rep(0,4)) size(g) <- c(600,600) plot(1:10) Thanks! Mark –––– Mark Heckmann Blog: www.markh

[R] generalized procrustes analysis without translation

2011-12-07 Thread Mark Heckmann
in advance Mark Mark Heckmann Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] Sweave problem on Mac OS when using umlauts and summary()

2011-12-03 Thread Mark Heckmann
2011 at 4:08 PM, Mark Heckmann wrote: >> I have the following Sweave file which gets sweaved correctly. >> >> <<>>= >> m <- lm(y1 ~x1, anscombe) >> summary(m) >> @ >> >> I include the sweaved .tex file into another .tex file via

[R] Sweave problem on Mac OS when using umlauts and summary()

2011-12-02 Thread Mark Heckmann
epackage line. This will cause an error when processing the entire document with tex. How can I achieve the last result in another way? I tried: Sweave('/Users/markheckmann/Desktop/test_sweave/ch1.Snw', encoding="UFT-8") But this does not work either when the usepackage line i

[R] splitting a string into words preserving blanks (using regex)

2011-10-24 Thread Mark Heckmann
t;split", " ") I was not able to achieve this via strsplit() . But I am not familiar with regular expressions. Is there an easy way to do that using e.g. regex and strsplit? Thanks Mark ––– Mark Heckmann Blog: www.markheckmann.de R-Blog: http://ryour

[R] problem with math expressions in grid graphics when using line breaks (\n)

2011-09-08 Thread Mark Heckmann
n more ", sigma))) Does someone have an idea how to fix that? TIA! Mark ––– Mark Heckmann Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mai

Re: [R] Adding vertical space before and after Sweave chunk

2011-07-14 Thread Mark Heckmann
Thanks Duncan, the problem now is that, the space between R code and R output is also increased. I would like to avoid this, i.e. vertical space R code NO SPACE R results vertical space TIA, Mark Am 14.07.2011 um 02:13 schrieb Duncan Murdoch: > On 13/07/2011 7:14 PM, Mark Heckmann wrote: &

[R] Adding vertical space before and after Sweave chunk

2011-07-13 Thread Mark Heckmann
igure out how to add vertical space before and after the Sweave chunk. Can someone help? Thanks in advance. Mark ––– Mark Heckmann Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com [[alternative HTML version de

Re: [R] blank space escape sequence in R?

2011-04-25 Thread Mark Heckmann
rm. If >> this is UTF-8, or some other ASCII compatible encoding, \x20 will work: >> >>> "foo\x20bar" >> [1] "foo bar" >>> >> >> For other locales, you might try charToRaw(" ") to see the binary (hex) >> representat

Re: [R] blank space escape sequence in R?

2011-04-25 Thread Mark Heckmann
probably talking about something else, but what? > > Duncan Murdoch ––– Mark Heckmann Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com [[alternative HTML version deleted]] __ R-help@r-p

[R] blank space escape sequence in R?

2011-04-25 Thread Mark Heckmann
Is there a blank space escape sequence in R, i.e. something like \sp etc. to produce a blank space? TIA Mark ––– Mark Heckmann Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com __ R-help@r-project.org

[R] Defining origin for rotation in RGL device

2011-04-25 Thread Mark Heckmann
)) lines3d(c(0,0), c(0,0), c(0, 1)) TIA Mark ––– Mark Heckmann Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] formal concept analysis in R?

2011-02-16 Thread Mark Heckmann
––– Mark Heckmann Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] drawing from one cell to another using layout() - possible?

2011-02-02 Thread Mark Heckmann
) layout.show(2) I would like the a's to not end at the layout borders of the left cell. Thanks in advance, Mark PS. I need to use base not groid graphics, though it may be simpler... -- Mark Heckmann (Dipl. Wirt.-Ing.) phone +49 (0) 421/1614618 __

[R] Finding non-ASCII characters in R code using R

2011-02-01 Thread Mark Heckmann
During R CMD check I get the following note: * checking data for non-ASCII characters ... NOTE Note: found 9 marked UTF-8 string(s) How can I search my code files for non ASCII chars using R? Thanks, Mark -- Mark Heckmann (Dipl. Wirt.-Ing.) phone +49 (0) 421/1614618 Empfehlen Sie GMX DSL

Re: [R] Printing graphics in Sweave problem

2010-12-30 Thread Mark Heckmann
Works, thanks! Mark Am 31.12.2010 um 01:30 schrieb Duncan Murdoch: > On 30/12/2010 6:14 PM, Mark Heckmann wrote: >> I want to print a .pdf file using Sweave like below. I do not want to use >> fig=true as I want to include it via normal tex. >> The problem: the pdf documen

[R] Printing graphics in Sweave problem

2010-12-30 Thread Mark Heckmann
dev.off() @ How can I avoid that? Thanks, Mark ––– Mark Heckmann Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com [[alternative HTML version deleted]] __ R-help@r-project.org ma

Re: [R] .Rd file for S4-method warning

2010-12-21 Thread Mark Heckmann
27; @docType methods #' @aliases show, testClass-method #' @usage \S4method{show}{testClass}(object) #' setMethod("show", "testClass", function(object){ }) Mark Am 20.12.2010 um 23:31 schrieb Duncan Murdoch: > On 20/12/2010 5:18 PM, Mark Heckmann wrote: >

[R] .Rd file for S4-method warning

2010-12-20 Thread Mark Heckmann
oxygen and the line is created automatically, so I need to create it properly. Thanks in advance, Mark ––– Mark Heckmann Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com [[alternative HTML version deleted]] _

[R] defining contrasts in lm() - is there a simpler way?

2010-12-14 Thread Mark Heckmann
ed contrast definition inside lm that is equivalent to the above") Thanks in advance, Mark ––– Mark Heckmann Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com __ R-help@r-project.org mailing list

Re: [R] S4 "["-method called twice - why?

2010-12-08 Thread Mark Heckmann
;> >> setMethod("[", signature(x = "testClass", i = "ANY", j="ANY"), > +function (x, i, j, ..., drop){ > +print("void function") > +return(NULL) > +} > + ) > [1] "[" >> x <- new(&quo

[R] S4 "["-method called twice - why?

2010-12-08 Thread Mark Heckmann
;void function" > x[1,1,1] [1] "void function" [1] "void function" > Why is that so? Can someone help me understand the logic behind it? Thanks, Mark ––– Mark Heckmann Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.

[R] Automatic reprinting in base graphics when resizing device - how?

2010-12-05 Thread Mark Heckmann
I need to do the same in base graphics. How can I automatically update (reprint) the device when it changes in size? Thanks, Mark ––– Mark Heckmann Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com [[alternative HTML version

[R] options()$width does not equal actual console width - why?

2010-11-26 Thread Mark Heckmann
each=10), collapse="")) 1122334455667 7889900 > options()$width [1] 59 Thanks Mark ––– Mark Heckmann Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com __ R-help@

[R] Roxygen examples in DONTRUN mode - how?

2010-11-20 Thread Mark Heckmann
. ## #' some function title #' #' some description #' #' @param x any R object that has a print function #' @return NULL only printing #' @examples \dontrun{ #'foo("test") #'foo(1:10) #' } foo <- function(x) print

[R] Roxygen examples in DONTRUN mode - how?

2010-11-20 Thread Mark Heckmann
\dontrun tag \examples{\dontrun{ ... some example R code} } How can I achieve this using roxygen? Thanks Mark ––– Mark Heckmann Dipl. Wirt.-Ing. cand. Psych. Celler Straße 27 28205 Bremen Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com

Re: [R] all extended ASCII characters exist for R console output?

2010-11-19 Thread Mark Heckmann
91\u2592\u2593") > > > On Fri, Nov 19, 2010 at 2:02 PM, Mark Heckmann > wrote: > Hi, > > can the R console print all extended ASCII characters? > I am especially interested in characters 176-178 from > http://www.asciitable.com/ > bottom table. > As far as I

Re: [R] all extended ASCII characters exist for R console output?

2010-11-19 Thread Mark Heckmann
is it also possible on the console? that is what i am actually interested in? Thanks in advance! Mark Am 19.11.2010 um 17:24 schrieb Henrique Dallazuanna: > In the plot window: > > plot(1, main = "\u2591\u2592\u2593") > > > On Fri, Nov 19, 2010 at 2:02 PM, Ma

[R] all extended ASCII characters exist for R console output?

2010-11-19 Thread Mark Heckmann
exists. TIA Mark ––– Mark Heckmann Dipl. Wirt.-Ing. cand. Psych. Celler Straße 27 28205 Bremen Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com [[alternative HTML version deleted]] __ R

[R] how to store package options over sessions?

2010-11-15 Thread Mark Heckmann
I want to define some options for my package the user may change. It would be convenient if the changes could be saved when terminating an R session and recovered automatically on the next package load. What is the standard way to implement this? TIA Mark ___

[R] overloading "[" and "[<-" using S3 classes

2010-10-30 Thread Mark Heckmann
i = "numeric"), function (x, i, j, ..., drop){ ... some operations }) How to do the same for S3? TIA! Mark ––– Mark Heckmann Dipl. Wirt.-Ing. cand. Psych. Vorstraße 93 B01 28359 Bremen Blog: www.markheckmann.de R-Blog: http://ryouready.wordp

[R] overloading the generic primitive functions "+" and "["

2010-10-28 Thread Mark Heckmann
l work correctly for my class? I saw an example of this in the ggplot2 package where different objects are joined using the "+" primitive. Still, I could not figure out how to do that. Can someone give a small code example to show how that works? TIA Mark ––

Re: [R] RDCOMClient interface - problems setting a variable

2010-08-13 Thread Mark Heckmann
1, 12) allShapes <- comGetProperty(slide, "Shapes") shape1 <- comInvoke(allShapes, "AddShape", 92, 200, 200, 100, 100) adj <- comGetProperty(shape1, "Adjustments") comGetProperty(adj, "Item", 1) comSetProperty(adj,"

[R] RDCOMClient interface - problems setting a variable

2010-08-13 Thread Mark Heckmann
ter via R. Can anyone help? A lot of thanks in advance!! Mark ––––––– Mark Heckmann Dipl. Wirt.-Ing. cand. Psych. Vorstraße 93 B01 28359 Bremen Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com __ R-help@r-p

[R] XML file from scratch using XML package

2010-08-12 Thread Mark Heckmann
I would like to build an XML file from scratch using the XML package. I would like to save the following vector in it: 1:10 Could someone help me by briefly outlining how I go about it ? And maybe provide a few lines of code? Thanks! Mark ––– Mark Heckmann

Re: [R] specify blank in a string with special characters

2010-07-20 Thread Mark Heckmann
This was just what I wanted, thanks!! Am 20.07.2010 um 16:43 schrieb Duncan Murdoch: > On 20/07/2010 10:09 AM, Mark Heckmann wrote: >> will reformulate the question: >> >> I use strsplit() to split a string at the blanks. e.g. >> >> > strsplit("Spli

Re: [R] specify blank in a string with special characters

2010-07-20 Thread Mark Heckmann
into the string that does not get split by strsplit() but still gives a blank when printed. E.g. > strsplit("Split%at blanks", " ") [[1]] [1] "Split at" "blanks" Is that possible? Am 20.07.2010 um 15:26 schrieb Duncan Murdoch: > On 20/07/2010

[R] specify blank in a string with special characters

2010-07-20 Thread Mark Heckmann
is there a way to specify a blank in a string with special/escape characters? like: "and now a blankand text after the blank", where stand for the specification of the blank character TIA Mark ––– Mark Heckmann Dipl. Wirt.-Ing. c

Re: [R] grid graphics - concatenating gLists - is there a function?

2010-03-28 Thread Mark Heckmann
Hi Paul, unfortunately this did not work out. I use the following now: childgrobs <- c(gl1, gl2) class(childgrobs) <- "gList" This seems to work for me. Bests, Mark Am 28.03.2010 um 23:44 schrieb Paul Murrell: > Hi > > Mark Heckmann wrote: >> I have to gList o

[R] grid graphics - concatenating gLists - is there a function?

2010-03-26 Thread Mark Heckmann
l2 into a single gList object, that is not nested. Thanks, Mark ––– Mark Heckmann Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com [[alternative HTML version deleted]] __ R-help@r-project.

[R] using a condition given as string in subset function - how?

2010-03-20 Thread Mark Heckmann
se this string in the subset call, like subset(df, conditionAsString) I do not exactly now how to combine substitute, expression, parse and so on to get what I want, which would be: subset(df, A==1 & B==1) but using the string conditionAsString. Thanks, Mark ––

Re: [R] passing a function as an argument using lazy loading

2010-03-14 Thread Mark Heckmann
ied to do it without the extra argument, though I still do not know if it is possible. If it is basically was my question if it is. Hope this makes it clearer, Thanks in advance, Mark Am 14.03.2010 um 15:43 schrieb Uwe Ligges: > > > On 10.03.2010 13:26, Mark Heckmann wrote: >>

[R] modifying the dots argument - how?

2010-03-11 Thread Mark Heckmann
function(...){ innerFoo <- function(...){ } AT THIS POINT I WANT TO MODIFY THE CONTENT OF ... BEFORE IT IS PASSED ON innerFoo(...) } Thanks, Mark ––– Mark Heckmann Dipl. Wirt.-Ing. cand. Psych. Vorstraße 93 B01 28359

[R] passing a function as an argument using lazy loading

2010-03-10 Thread Mark Heckmann
is evaluated using lazy loading. Can someone help? Thanks, Mark ––– Mark Heckmann Dipl. Wirt.-Ing. cand. Psych. Vorstraße 93 B01 28359 Bremen Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com __ R-h

[R] latent class factor analysis (LCFA) in R?

2010-02-23 Thread Mark Heckmann
I am looking for a package that can perform latent class factor analysis (LCFA) like in LatentGold. Does someone know wether or not it has been implemented in some package? I just can't find it. Bests, Mark ––– Mark Heckmann Dipl. Wirt.-Ing. cand.

[R] evaluate variable within expression - how?

2010-02-14 Thread Mark Heckmann
easy to understand. Thanks, Mark ––––––– Mark Heckmann Dipl. Wirt.-Ing. cand. Psych. Vorstraße 93 B01 28359 Bremen Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com [[alternative HTML version deleted]] __ R-help@r-project.org mailing

[R] legend mathematical annotation problem

2010-02-13 Thread Mark Heckmann
is used as argument separator in expression. plot(110, 0.8) categories <- expression(blank >= 85, 84,9 - 80, 79,9 - 75, 74,9 - 70, 69,9 - 65, 64,9 - 60, blank< 60) legend(110, 0.8, categories, lty=1:7, lwd=3, col=1, merge=TRUE) This does obviously not work. Any ideas? Thanks, Mark –––

[R] detect brightness of hex color value in R / convert from hex to hsl/hsv space how?

2010-01-29 Thread Mark Heckmann
n I convert hex to hsv/ hsl space How would you detect the (perceived) color brightness? Thanks Mark ––– Mark Heckmann Dipl. Wirt.-Ing. cand. Psych. Vorstraße 93 B01 28359 Bremen Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.

[R] sp package - How to join two or more polygons from a SpatialPolygonsDataFrames

2010-01-21 Thread Mark Heckmann
colorkey = FALSE, lwd=.4, col="white") ––– Mark Heckmann Dipl. Wirt.-Ing. cand. Psych. Vorstraße 93 B01 28359 Bremen Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com __ R-help@r-project.or

Re: [R] how to flatten a list to the same level?

2010-01-09 Thread Mark Heckmann
to the generated list. But I did not succeed in that. Mark Am 08.01.2010 um 18:29 schrieb Henrique Dallazuanna: Try something about like this: split(unlist(l), rep(1:length(idx <- rapply(l, length)), idx)) On Fri, Jan 8, 2010 at 1:35 PM, Mark Heckmann wrote: I have a nested list

[R] how to flatten a list to the same level?

2010-01-08 Thread Mark Heckmann
rec=F) do not work here as the level of nesting may differ on the elements. The result should look like: $A [1] 1 2 3 $B [1] "a" "b" $A [1] 1 2 3 $B [1] "a" "b" $A [1] 1 2 3 $B [1] "a" "b" $A [1] 1 2 3 $B [1] "a" "

Re: [R] plyr: issue with column names when converting one element list to dataframe

2010-01-06 Thread Mark Heckmann
ot; Mark Am 06.01.2010 um 15:48 schrieb hadley wickham: Hi Mark, Could you send a the results of dput(l)? It will make exploration easier. Hadley On Wed, Jan 6, 2010 at 8:07 AM, Mark Heckmann wrote: Hi, I have an issue concerning plyr. I have a list l as output from dlply. l $

[R] plyr: issue with column names when converting one element list to dataframe

2010-01-06 Thread Mark Heckmann
ames are as desired. > l2 <- c(l,l) > list_to_dataframe(l2) .id (0.5,1.5] (1.5,2.5] (2.5,3.5] (3.5,4.5] 1 1 0.2342569 0.465995 0.2518892 0.04785894 2 1 0.2342569 0.465995 0.2518892 0.04785894 Does someone know a remedy? TIA, Mark Mark Heckmann Dipl. Wirt.-Ing. cand. Psych. Vorstraße 93 B01

Re: [R] changing a list element's name during execution in lapply - possible?

2010-01-01 Thread Mark Heckmann
b="B") > lapplyWithRename(L, f) > > Output looks like this: >> lapplyWithRename(L, f) > $`Name A` > [1] "A" > > $`Name B` > [1] "B" > > > On Fri, Jan 1, 2010 at 8:21 AM, Mark Heckmann > wrote: >> Happy New Year, all! >>

Re: [R] changing a list element's name during execution in lapply - possible?

2010-01-01 Thread Mark Heckmann
ith each node now named "new name". If you want that > named list to become "l", then you need to do an assignment: > > l <- lapply(l, function(x) {names(x) <- "new name"; return(x) }) > > l > $a > new name >

[R] changing a list element's name during execution in lapply - possible?

2010-01-01 Thread Mark Heckmann
mes(x) <- "new name"; return(x) }) This does not work, any ideas? TIA ––– Mark Heckmann Dipl. Wirt.-Ing. cand. Psych. Vorstraße 93 B01 28359 Bremen Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com

[R] gWidgets / RGtk2 - how to change a handler from a toolbar?

2009-12-27 Thread Mark Heckmann
(label="Test", icon="open", handler=defHandler) tblList = list( test = aTest ) toolBar = gtoolbar(tblList, cont=w) At this point I would like to change the handler from the aTest object. Does someone know? TIA Mark ––– Mark Heckmann Dipl. W

Re: [R] RGtk2 / gWidgets - addHandlerClicked Problem

2009-12-27 Thread Mark Heckmann
Dec 27, 2009, at 11:29 AM, Mark Heckmann wrote: > >> In The following code, the table handler is executed twice when the >> button is pressed (from the 2nd pressing on). > > Can't reproduce. On a Mac 10.5.8, R 2.10.1, running the 64 bit GUI, > after choosing the gWi

[R] RGtk2 / gWidgets - addHandlerClicked Problem

2009-12-27 Thread Mark Heckmann
lerclicked table\n") }) Thanks! Mark ––– Mark Heckmann Dipl. Wirt.-Ing. cand. Psych. Vorstraße 93 B01 28359 Bremen Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com __ R-help@r-project.org mailing li

[R] RGtk2 - retrieve ggraphics mouse coordinates during drag-and-drop event

2009-12-21 Thread Mark Heckmann
ler = defHandlerSource) #defHandlerSource = function(h,...) print("source") adddropmotion(g, handler=function(h, ...) { print("motion") }) adddroptarget(g, targetType="object", handler = defHandlerTarget, g) defHandlerTarget = function(h, ...){ print(h$dropdata)

[R] Reordering the results from table(cut()) by break argument

2009-12-02 Thread Mark Heckmann
1] ( 1,0] (0,-1] (-1,-2] (-2,-3] 0 12 30 42 13 3 Thus I would like to reorder the vector using break, but I do not know how. TIA Mark ––––––– Mark Heckmann Dipl. Wirt.-Ing. cand. Psych. Vorstraße 93 B01 28359 Br

[R] write to RTF format - possible?

2009-10-29 Thread Mark Heckmann
Hi everybody, To write a .txt file I use write.table() Is there a way to write to a .rtf file as well? TIA Mark ––– Mark Heckmann Dipl. Wirt.-Ing. cand. Psych. Vorstraße 93 B01 28359 Bremen Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com

Re: [R] Using regular expressions to detect clusters of consonants in a string

2009-07-01 Thread Mark Heckmann
Heckmann + 49 (0) 421 - 1614618 www.markheckmann.de R-Blog: http://ryouready.wordpress.com -Ursprüngliche Nachricht- Von: Gabor Grothendieck [mailto:ggrothendi...@gmail.com] Gesendet: Dienstag, 30. Juni 2009 18:31 An: Mark Heckmann Cc: r-help@r-project.org Betreff: Re: [R] Using regular

[R] Using regular expressions to detect clusters of consonants in a string

2009-06-30 Thread Mark Heckmann
{1}" , str, ignore.case =TRUE, extended = TRUE)[[1]] [1] 4 7 attr(,"match.length") [1] 3 3 This also fails. Thanks in advance, Mark --- Mark Heckmann www.markheckmann.de R-Blog: http://ryouready.wordpress.com __

Re: [R] using regular expressions to retrieve a digit-digit-dot structure from a string

2009-06-09 Thread Mark Heckmann
; strsplit(txt, "[[:alpha:]]\\." , perl=T) [[1]] [1] "One January 1. I saw Ric" " He was born in the 19. centur" But this erases the last letter from each sentence. Does someone know a solution? TIA Mark --- Mark Heckmann + 49 (0) 4

Re: [R] using regular expressions to retrieve a digit-digit-dot structure from a string

2009-06-09 Thread Mark Heckmann
t;\\1*", txt), "\\* *") [[1]] [1] "One January 1. I saw Rick?" "He was born in the 19. century." --- Mark Heckmann + 49 (0) 421 - 1614618 www.markheckmann.de R-Blog: http://ryouready.wordpress.com -Ursprüngliche Nachricht

[R] using regular expressions to retrieve a digit-digit-dot structure from a string

2009-06-08 Thread Mark Heckmann
re but I do not want the 21.-dot to be returned as well. I am not good at regular expressions. How can I retrieve or recognize dots excluding the digit-digit-dot structure? TIA, Mark --- Mark Heckmann + 49 (0) 421 - 1614618 www.markheckman

[R] changing Swaeve output settings for .pdf and .eps - is there a way?

2009-04-16 Thread Mark Heckmann
to e.g. 3 inch? TIA, Mark PS. I posted a similar matter a week ago (https://stat.ethz.ch/pipermail/r-help/2009-April/194352.html), but now I think the question is much more precise. ------- Mark Heckmann www.markheckmann.de http://ryouready.wordpress.com __

[R] does grid.rect() not accept NULL argument from gpar(col=NULL) ?

2009-04-08 Thread Mark Heckmann
I want to draw a grid rectangle without a border. ?gpar says: "Specifying the value NULL for a parameter is the same as not specifying any value for that parameter, except for col and fill, where NULL indicates not to draw a border or not to fill an area (respectively)." pushViewport(viewport(h

Re: [R] change default output size when using Sweave

2009-04-08 Thread Mark Heckmann
ad if someone knows a solution. TIA, Mark -Ursprüngliche Nachricht- Von: Duncan Murdoch [mailto:murd...@stats.uwo.ca] Gesendet: Dienstag, 7. April 2009 19:08 An: Mark Heckmann Cc: r-help@r-project.org Betreff: Re: [R] change default output size when using Sweave On 4/7/2009 10:39

[R] change default output size when using Sweave

2009-04-07 Thread Mark Heckmann
I am trying to create a graphic output in Sweave but I do not want it to be standard size. I want the whole graphic to be 80mm of height only, just like the viewport below. <>= pushViewport(viewport(height = unit(80, "mm"))) grid.rect() grid.text("I want this viewport to be the whole

[R] change inter-line spacing in grid graphics - how to?

2009-04-07 Thread Mark Heckmann
I am trying to change the inter-line spacing in grid.text(), but I just don't find how to do it. pushViewport(viewport()) grid.text("The inter-line spacing\n is too big") popViewport() Can anyone help? TIA, Mark __ R-help@r-project.org mailing list htt

[R] Problem using odfWeave

2009-01-11 Thread Mark Heckmann
ning message: closing unused connection 5 (content.xml) --- No rofficeOUT.odt is rendered. What can I do about it? TIA, Mark -- Mark Heckmann (Dipl. Wirt.-Ing.) phone +49 (0) 421/1614618 __ R-help@r-project.org mailing list https://stat.ethz

[R] can the pdf output page break be controlled manually?

2009-01-07 Thread Mark Heckmann
I would like to control where to make a page break in my pdf file. The following code renders three pages of output. But I would like to be able to control the page breaks. pdf(file="test.pdf", paper="a4") par(mfrow=c(2,2)) hist(rnorm(100)) hist(rnorm(100)) hist(rnorm(100

Re: [R] Merge or combine data frames with missing columns

2008-12-29 Thread Mark Heckmann
the following list. l <- list(data.frame(a=1, b=2), data.frame(a=2, c=3, d=5)) I am not able to figure out why. Does anyone know what could be done to fix it? TIA, Mark Original-Nachricht > Datum: Mon, 29 Dec 2008 16:17:22 -0200 > Von: "Henrique Dallazuanna"

[R] Merge or combine data frames with missing columns

2008-12-29 Thread Mark Heckmann
is that not always all possible columns (Intercept, y1, y2, y3, y4) exist or at least have NA entries . I cannot figure out how (e.g. with merge)... TIA, Mark -- Mark Heckmann (Dipl. Wirt.-Ing.) phone +49 (0) 421/1614618 Sensationsangebot verlängert: GMX FreeDSL - Telefonanschluss + DSL

[R] Problem in passing on an argument via ... how do I access it?

2008-12-22 Thread Mark Heckmann
Hi r-experts, I want to check if a certain argument has been passed on in a function call via ... ftest <- function(x1, ...) { if(hasArg(y2)==TRUE) print(y2) } Now I call the function passing y2 via ... but I cannot access or use the object. ftest(y2= 2, x= 1) > error in print(y2) : object

[R] imputing the numerical columns of a dataframe, returning the rest unchanged

2008-12-22 Thread Mark Heckmann
Hi R-experts, how can I apply a function to each numeric column of a data frame and return the whole data frame with changes in numeric columns only? In my case I want to do a median imputation of the numeric columns and retain the other columns. My dataframe (DF) contains factors, characters and

[R] using jackknife in linear models

2008-12-18 Thread Mark Heckmann
Hi R-experts, I want to use the jackknife function from the bootstrap package onto a linear model. I can't figure out how to do that. The manual says the following: # To jackknife functions of more complex data structures, # write theta so that its argument x # is the set of observation number

[R] Shrink Trellis margins settings (when printed to png file)

2008-12-17 Thread Mark Heckmann
Dear R-experts, I have two problems: PROBLEM (1) --- I want to produce a very small png file (35 x 18 px) that contains a histogram without a figure region or margins, only the pure heights. In the base graphic system this is simple: png(filename = "hist.png", res = 72, width=35, hei

[R] Check if data frame column is numeric

2008-12-16 Thread Mark Heckmann
Hi R-users, I want to apply a function to each column of a data frame that is numeric. Thus I tried to check it for each column first: > apply(df, 2, function(x) is.numeric(x)) A60 A64 A66a A67 A71 A75a A80 A85 A91 A95 A96 A97

[R] Trellis margins settings so that they are like a base graphic with no figure region when printed to png file?

2008-12-12 Thread Mark Heckmann
Dear R-experts, I want to produce a very small png file (35 x 18 px) that contains a histogram without a figure region or margins, only the pure heights. In the base graphic this was easy: png(filename = "hist.png", res = 72, width=35, height=18) par(mar=c(0,0,0,0), oma=c(0,0,0,0))

[R] check if a certain ... argument has been passed on to my user-defined function

2008-12-11 Thread Mark Heckmann
Hi, How can I check if a certain ... argument has been passed on to my user-defined function or not? foo <- function(data, ...) { ### here I want to check whether xlab was passed with the ... arguments ### or if the ... arguments did not contain an xlab argument } I tried missing(xlab) , exist

[R] passing on the ... arguments in a progammed graphics function

2008-12-11 Thread Mark Heckmann
Hi everyone, I want to write a wrapper function that uses the hist() function. Now I want to allow the hist breaks argument as optional in my function. So when my function contains the breaks argument I want the hist() function to use it, if not, I want the hist() function to use its default for b

  1   2   >