similar to: how to store package options over sessions?

Displaying 20 results from an estimated 100000 matches similar to: "how to store package options over sessions?"

2010 Nov 20
3
how to store package options over sessions?
Hi, I posted this a week ago on r-help but did not get an answer. So I hope that someone here can help me: 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. Is that possible and if yes, is the standard way to implement this? Thanks, Mark
2009 Jan 07
2
can the pdf output page break be controlled manually?
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)) plot.new() par(mfrow=c(1,1)) hist(rnorm(100)) hist(rnorm(100)) dev.off() It
2008 Dec 29
4
Merge or combine data frames with missing columns
Hi R-experts, suppose I have a list with containing data frame elements: [[1]] (Intercept) y1 y2 y3 y4 -6.64 0.761 0.383 0.775 0.163 [[2]] (Intercept) y2 y3 -3.858 0.854 0.834 Now I want to put them into ONE dataframe like this: (Intercept) y1
2014 May 10
1
Replay plot not allowed across sessions.
I wrote about this some time back as this new "feature" has made R less convenient for me since I story many, say 1000 to 1500 diagnostic plots per session. Georgely Daroczi has a nice hack in Rapporter//pander which it makes it possible to replay a single bad plot by hacking the data structure so as to change an offending part. Not surprisingl.doing this to all my saved recordedplot
2009 Jun 08
3
using regular expressions to retrieve a digit-digit-dot structure from a string
Hi, i need to recognize itemization structures in strings which follow the format: "digit-digit-dot" like e.g. 1. 2. 19. 211. Given the string " This happened in the 21. century." (the dot behind 21 is used in German instead of 21st) I want know where the dots are but I do not want the 21.-dot to be returned as well. I am not good at regular expressions. How
2010 Jan 01
2
changing a list element's name during execution in lapply - possible?
Happy New Year, all! I want to do calculations on each element of a list l, but i want the returned list element to be named differently after the calculation. Is it possible to do the renaming somehow within the lapply call? l <- list(a=NA, b=NA) lapply(l, function(x) {names(x) <- "new name"; return(x) }) This does not work, any ideas? TIA
2008 Dec 16
3
Check if data frame column is numeric
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 A98 A99 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
2012 Sep 01
1
correct "--help' options
Hello hpa, When running each ldlinux.sys installer: extlinux syslinux syslinux[64].exe syslinux.com with the "--help" argument, the results are different, depending on the specific installer. Under the Linux-based installer(s): --once=... Execute a command once upon boot while for the others: --once=... -o Execute a command once upon boot Note that the
2009 Dec 02
2
Reordering the results from table(cut()) by break argument
I have a vector and need to count how many data points fall inside each bin: dat <- rnorm(100) breaks <- -3:3 table((cut(dat, breaks))) (-3,-2] (-2,-1] (-1,0] (0,1] (1,2] (2,3] 3 13 42 30 12 0 if I reverse the breaks vector, the results remains the same: breaks <- rev(breaks) table((cut(dat, breaks))) (-3,-2] (-2,-1] (-1,0] (0,1] (1,2]
2004 May 07
1
dump.frames in non-interactive mode
Hi, recover() resorts to dump.frames() when called in non-interactive sessions. However dump.frames() still puts the dump into last.dump object and not into a file, which brings the question of how to get hold of the object once the session terminates. I guess the supposed answer is that last.dump is saved in .Rdata once R exits. However I find it more convenient on day-to-day basis to use
2009 Dec 27
1
gWidgets / RGtk2 - how to change a handler from a toolbar?
I want to assign a default handler to a toolbar button and change the handler later. The addhandlerclicked() method does not apply to a gAction Object, I think... defHandler <- function(h, ...) print("default") w <- gwindow() aTest <- gaction(label="Test", icon="open", handler=defHandler) tblList = list( test = aTest ) toolBar = gtoolbar(tblList,
2010 Jan 08
1
how to flatten a list to the same level?
I have a nested list l like: l <- list(A=c(1,2,3), B=c("a", "b")) l <- list(l,l, list(l,l)) I want the list to be unlisted, but not on the lowest level of each "branch". I want the lowest level of each list branch to remain as it is. So unlist or unlist(rec=F) do not work here as the level of nesting may differ on the elements. The result should look like:
2011 Sep 08
1
problem with math expressions in grid graphics when using line breaks (\n)
I want to plot a multiline annotation including a mathematical expression using grid graphics (grid.text). This works fine for a single line, but the math expression is misplaced when I insert a line break ("\n" escape sequence): grid.text(expression(paste("Some words here\n more ", sigma))) Does someone have an idea how to fix that? TIA! Mark
2008 Dec 11
3
check if a certain ... argument has been passed on to my user-defined function
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) , exists(xlab) and several other things but did not find a solution. TIA, Mark
2007 Mar 23
4
DISAATER RECOVERY PROBLEM
Hi Guys, I am trying to set up a quick disaster recovery methodology for a client. It is supposed to work as follows:- All Data files , everything in /etc (except for a few hardware specific files such as fstab), all users .bashrc and .netrc files, all cron tables etc. is written to a DVD as a zipped tar file. A recovery script that unpacks this file, creates any directories required by the
2003 Jan 29
4
reconnect ssh connection?
has someone come up with a trick to let disconnected ssh connections be recovered without terminating and having to restart rsync (perhaps by wrapping ssh or something)? i have a very large (but pretty stable/unchanging) tree of files that i need to sync daily, at night, between two geographically different servers. i'm using rsync -avz --force -e ssh SOURCE DEST. the connection is
2009 Dec 22
1
RGtk2 - retrieve ggraphics mouse coordinates during drag-and-drop event
Hi all, I have a gtable and a ggraphic widget. I want to drag an element from the table onto the graphic. When the drag object is released over the ggraphic widget, I want the mouse coordinates inside the ggraphic to be returned. Right now I do not know how to get the mouse ccordinates of the ggraphic widget at any given time. How can I access the ggraphics mouse coordinates? Below you find
2009 Jan 11
1
Problem using odfWeave
Hi everybody, I don't get odfWeave to run properly. My odt file is as a simple as: ------------------------ Some text. <<echo=FALSE>>= print(1:10) @ ----------------------- The output I get ist the following: ----------------------------------- > odfWeave("roffice.odt", "rofficeOUT.odt") Copying roffice.odt Setting wd to
2009 Apr 07
1
change inter-line spacing in grid graphics - how to?
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
2013 Oct 19
3
Suggestions for an "official" place to store permissions/options for a package?
R-developers: Duncan Murdoch suggested I move a post I started on r-help over here, since it is more at the developer level. Here is my question/challenge -- to my knowledge, there is not currently an official way to store a *package*'s options to a standardized location on a user's computer. Given that OS-level programs have standard preference locations, I was hoping to first assess: