similar to: Re: [R] Execute function at startup

Displaying 20 results from an estimated 3000 matches similar to: "Re: [R] Execute function at startup"

2004 Apr 14
1
Re: [R] Execute function at startup
I think you can already do this via .First(). If you start your .First with something like this [give or take some parentheses] if( !is.null( runfirst <- Sys.getenv( 'RUNFIRST'))) try( eval( parse( text=runfirst)))) then whatever you pass in as RUNFIRST=... should get executed on startup. Could even be a call to source(...) if you want to source a particular file. I have a similar
2006 Jan 09
2
Problem installing from source: no CONTENTS files
I've just had the error below while trying to install a package from source under R2.2.1 and Windows XP. I recall encountering this sporadically in the past. It is a pretty confusing message and took me quite some time to figure out; I've seen queries about it on the R site search, but couldn't find a reply. There's an attempted diagnosis and suggested cure below.
2009 Oct 16
0
post-installation startup problem with 2.10.0
I've just installed R2.10.0 v50082, and found the problem described below the first few times I launched it. Did not occur with v49613 (the previous most recent version I have). The problem has now gone away, and is therefore non-reproducible, but there seems to be something up with parameter processing or environment variable checking or loading of .RData files immediately after installation.
2004 Jan 22
0
FW: Réf. : Packages debug and mvbutils
Please use the CRAN versions, not the ftp versions which are now out-of-date. Both packages are on base CRAN now, but may not have propagated to all mirrors yet. (But thanks to Gerald for responding-- I had de-subscribed from R-help.) For anyone using the HANDY package (a Windows-specific package which includes a non-C DLL, so I can't CRAN it): I'll post an updated version on the ftp site
2003 Sep 24
1
getAnywhere (PR#4275)
'getAnywhere' is not reporting methods when there are periods in the class name or the generic name (in R-devel). > getAnywhere( 'predict.loess') A single object matching 'predict.loess' was found It was found in the following places registered S3 method for predict from namespace modreg namespace:modreg with value <<...>> > getAnywhere(
2006 Oct 23
0
FW: Debug package question
Dear list, I received the response below from the package author of 'debug'. I post it to the list, with Mark's approval, in case it is useful to others too. Regards, Matthew -----Original Message----- From: Mark.Bravington at csiro.au [mailto:Mark.Bravington at csiro.au] Sent: 22 October 2006 23:53 To: Matthew Dowle Cc: Mark.Bravington at csiro.au Subject: RE: Debug package
2003 May 02
0
predict (PR#2686)
Hmmm-- still looks like a bug to me! But as I don't want to hog the airwaves, here's my last summary on this point, with a question: [Bravington] #> Prediction from the original data was just an example, of course; my general #> proposal is that inactive factor levels in the prediction set should be #> dropped. I don't see how this could ever cause inconsistent behaviour
2004 Sep 16
0
FW: Parsing multi-line strings. Bug? Feature?
> Kevin Wright <kwright@eskimo.com> writes: > > > R 1.9.1 requires multi-line strings to contain a backslash at the > > end of each line (except the last line). As noted by Mark > > Bravington (http://tolstoy.newcastle.edu.au/R/help/02b/5199.html) > > this requirement appears to be undocumented. > > > > In S-Plus 6.2, multi-line strings do
2002 Dec 27
1
Wish list: add an "until" or "EOF.marker" parameter to scan & rea dLines
A bit late for Santa, but on my wish-list nevertheless: is there any chance that "scan" and "readLines" could be extended to take a parameter "until" or "EOF.marker", which would be a character string that (if encountered while reading) would cause the reading to stop, just as if an end-of-file had been found? [But leaving a connection open, so that
2007 Mar 26
1
Problem in loading all packages all at once
Hi All Please see the Rprofile file which i have modified as follows and after that when I start R then I see that R says to me "TRUE" for all the packages implying that all loaded at once. But when i try to use commands as simple as help("lm"), it doesnt work nor any of the menu "Packages" is not working. Although the regression using lm ( Y ~ X ) is working
2003 Aug 05
1
(PR#3658)
The function 'getAnywhere' crashes if given a non-existent name containing a period: > getAnywhere( 'nomethod.noclassforme') Error in get(x, envir, mode, inherits) : variable "nomethod" was not found However, 'getAnywhere' behaves gracefully if the non-existent name lacks a period: > getAnywhere( 'nomethod') no object named `nomethod' was
2002 Oct 21
1
savehistory directories and quitting R (PR#2038)
Thanks-- as Duncan Murdoch also noted, R_HISTFILE can be used to solve my problem, as below. BTW it's not easy to find out about R_HISTFILE in the help system or manuals, though, unless you already know it exists-- it only seems to be described under startup options, not things to do with history. However, Duncan's reply did hint at an inconsistency, in that savehistory() defaults to
2003 Jan 30
2
print.default and attributes
When something gets printed by the "print.default" function, any extra attributes are printed without regard to their class attribute (if any). For example: > x <- 1:3 > attr( x, 'other') <- factor( c( 'cat', 'dog')) > attr( x, 'other') [1] cat dog Levels: cat dog > x [1] 1 2 3 attr(,"other") [1] 1 2 which is perhaps
2002 Aug 08
0
RE: rmultinom
Hi Mark: I had also used sample and tabulate for generating multinomial and found it to be quite slow. So I had written a multinomial random numbers generator based on the GENMUL subroutine from "ranlib", which in turn is based on the algorithm from Luc Devroye's book on "Non-Uniform Random Variate Generation" You may want to compare this with your hybrid algorithm and
2003 Sep 25
1
tkinsert (PR#4289)
In R-1.7.1, I used to be able to append a character vector to a 'tklistbox' with e.g. listio <- tklistbox( tktoplevel(), font='Courier', height=20, width=20, setgrid=TRUE) tkinsert( listio, 'end', letters[1:3]) tkpack( listio,side='left', expand=TRUE, fill='both') and three items would be added to 'listio'. This doesn't work in R-devel-- it
2002 May 16
0
(PR#1556)
lib.fixup My previous post mentions a problem encountered when calling ".Internal( lib.fixup..." in R1.5.0. I have since found a workaround. It's possible in R1.5.0 to set attributes of search path environments directly, like so: > env_ pos.to.env( 3) > attr( env, 'any.attr')_ 'any.value' > pos.to.env( 3) <environment: package:tcltk>
2002 Dec 27
0
parse and pushBack (PR#2396)
Is this the last bug of the year? Well, it's the last one from me, anyway... The "parse" function seems to give erratic behaviour when used in conjunction with "pushBack" on an open connection (R1.6.1, Windows 2000). Try this: > { cat( c( '1', 'a+b', '2'), file='r123.r', sep='\n'); tcon_ file( 'r123.r'); open( tcon);
2003 Mar 26
0
termplot (PR#2687)
# r-bugs@r-project.org `termplot' bombs if the original dataset contains NAs in the predictors, even if these were ignored during fitting: test> bug.data_ data.frame( x=c(1:3, NA), y=runif( 4)) test> lm.tpbug_ lm( y~x, data=bug.data) test> termplot( lm.tpbug) Error in xy.coords(x, y, xlabel, ylabel, log) : subscript out of bounds A simple fix seems to be add the
2003 Oct 28
0
data.frame replacement (PR#4820)
When replacing all elements of a column in a data.frame, a corrupt data.frame will be generated if the replacer is "short": test> bbb <- data.frame( x=1:2) test> bbb[,'x'] <- 3 # should fill the column test> bbb x 1 3 2 <NA> Warning message: corrupt data frame: columns will be truncated or padded with NAs in: format.data.frame(x, digits = digits)
2004 Apr 07
0
.First and base reorganization in R 1.9.0
I noticed that, in R1.9.0 beta where the old 'base' package has been split into 4, '.First' gets executed with just the new 'base' loaded, before 'stats' 'utils' and 'graphics' are available. The NEWS file does warn that this will be the case for .Rprofile, but doesn't mention .First. Is this actually the intended behaviour where .First is