similar to: How do one modify an expression?

Displaying 20 results from an estimated 60000 matches similar to: "How do one modify an expression?"

2002 Feb 20
2
How to get the penalized log likelihood from smooth.spline()?
I use smooth.spline(x, y) in package modreg and I would like to get value of penalized log likelihood and preferable also its two parts. To make clear what I am asking for (and make sure that I am asking for the right thing) I clarify my problem trying to use the same notation as in help(smooth.spline): I want to find the natural cubic spline f(x) such that L(f) = \sum_{k=1}{n} w[k](y[k] -
2004 Jul 27
2
Incorrect display of b[hat((a))] expression in plots
Hi, I am not sure if this is a bug or a non-implement feature of text-drawing functions with TeX-style expression, but hat() and some of its equals does not get the right "bounding boxes" if they are put in sub- or superscripts. For instance, for the expression 'b[hat(a)]' the hat() seems to shift 'hat(a)' too much to the right of 'b'. Try the below example and
2001 Jul 06
1
Title of bundled packages in the library index (PR#1017)
Full_Name: Henrik Bengtsson Version: 1.3.0 OS: Windows Me Submission from: (NULL) (216.175.122.171) I realized that the title of packages in the library index when they are in a bundle is the title of the bundle and not the package. It looks like the TITLE file, which apparently is used for generating the library index, takes the value of the bundle's title and not the package's title.
2007 May 14
1
Native implementation of rowMedians()
Hi, I've got a version of rowMedians(x, na.rm=FALSE) for matrices that handles missing values implemented in C. It has been optimized for memory and speed. To avoid coercing integers to doubles, and hence allocate an additional 200% memory, there is one C function for integers and one for doubles. The rowMedians() implementation is currently sitting in my non-CRAN package R.native
2014 Dec 06
1
R CMD check --as-cran and (a)spell checking
Does anyone know if it is possible to add a dictionary file of known words that becomes part of the *built* package to tell 'R CMD check --as-cran' not to report these words as misspelled. I want this dictionary to come with the *.tar.gz such that it will be available regardless where the package is checked. For instance, currently I get: * using log directory
2005 Jul 15
2
R v2.1.0 patched (>2005-05-09) for Windows?
I'm trying to troubleshoot a case where R crashes on Windows. It does not occur at all with my R v2.1.0 patched (2005-05-09), but happens on R v2.1.1 (patched or non-patched) in many different cases. The R v2.2.0dev (2005-07-15) also got this problem (although it won't crash on the below example). I previously reported this
2001 Mar 22
1
Call by reference: Was: Object orientation?
To reply to Yves Gauvreau question (Jan 24, 2001) about how to set values within function, it is possible to do without without using the "<<-" assignment operator or other nasty tricks. I had the same problem and I did a nasty workaround two weeks ago implementing the functionality of reference variables, but today I "ran into" the [R] help page for ".Alias".
2001 Mar 07
1
Minor bug in maketitle.pl (with bug correction) (PR#864)
Full_Name: Henrik Bengtsson Version: rw1022 OS: Windows Me Submission from: (NULL) (216.175.126.55) When ${R_HOME}/share/perl/maketitle.pl tries to generate a TITLE that is longer than $lc-3 (=13) characters long, it repeats the package name on line two. Example: Now it generates an output like: com.braju.graphics com.braju.graphics Bla bla bla... But, I believe it should
2001 Jun 30
1
Rd tag \link not working without \code (PR#1006)
Full_Name: Henrik Bengtsson Version: 1.3.0 OS: Windows Me Submission from: (NULL) (216.175.124.18) Even though I know the Rd format might be replaced soon, I am report this just in case: The package optional argument for \link is *only* used when \link is in a \code environment. Example: 1) This link works: \code{\link[base]{cat}} 2) But not this one: \link[base]{cat} It looks like the
2002 Jan 18
2
easier way to update packages i'm developing?
I'm frightfully new at developing r packages. I'm developing an econometrics package, and each time I update my beta package, I close R, delete the package dir in the library dir, rebuild the zip file, rerun R, reinstall the package and run the functions. Is there a more efficient way? Jeff. Jeff D. Hamann Hamann, Donald & Associates, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421
2006 May 05
4
str() with attr(*, "names") is extremely slow for long vectors
Hi, I noticed some time ago that, for instance, named vectors that are really makes str() really slow when displaying the names attribute. I don't know exactly when this started, but it wasn't the case say 1-2 years ago. Example (on a WinXP 1.8GHz): > s <- 1:1000; names(s) <- s > system.time(str(s)) Named int [1:1000] 1 2 3 4 5 6 7 8 9 10 ... - attr(*, "names")=
2005 Feb 16
0
Depends, require(), autoload() and "side effects"?
Hi. If your package require another package in order to define its methods (but afterwards in is not needed), how should one specify this? Is it correct to assume that "Depends" will assure that all packages are loaded (attached? what is the right word) *before* the methods in the current package are defined? Basically I use my own setMethod() called setMethodS3() that is defined in
2001 May 01
1
scan without line numbers?
When using the function scan(quiet=TRUE) the line numbers are printed. Example: > scan(quiet=TRUE) 1: 123 [ENTER] 2: [ENTER] [1] 123 > Is it possible to not show the line numbers? I know about readLines() but I would like to be able to use the extra features of scan(). Thanks for you help! Henrik Bengtsson henrikb at braju.com
2003 Mar 04
4
writing several command line in R console
Hi R lovers I would like to know how to step to the next line in the R console editor without breaking the continuity of my code more clearly : if for example I write a function, so far i have to write the all code inside on the same line wich may become obscure as the function is more and more complex. I would like to do like in the example of the manuels: >twosam <- function(y1, y2) {
2001 May 08
1
ASCII map?
Is there a way to convert between and integer and a character and vice versa? For instance i <- 65; ch <- intToChar(i); # "A" i <- charToInt(ch); # 65 or even better i <- c(65, 66); ch <- intToChar(i); # c("A", "B") i <- charToInt(ch); # c(65, 66) I have tried to do a ASCII map myself, and I figured out that the ASCII
2008 May 12
1
Mathematical annotation in lattice strip: Is it possible?
I have tried without success to find a way including the square root symbol in lattice strips as part of my conditioning labels. I have tried supplementing by creating a list of vectors using the var.name function coupled with the expression function used in xlab/ylab. xyplot(adjusted_Rand_index~cluster|distance_measure, main="Level of agreement between partitions: Wards Method",
2009 Sep 28
1
axis label using expression()
Probably a very simple problem: I want to annotate a plot axis with a name of my data using expression(). The name for the data is $\hat P4_k$ written in LaTex style -> hat symbol above P, followed by a 4 and a subscripted k index I tried to write this using x<-c(1,2,3,4) y<-c(3,5,7,9) plot(x,y,xlab=expression(hat(P4[k])) ) but cant find a way to force the hat
2016 Oct 19
2
How to assign NULL value to pairlist element while keeping it a pairlist?
On Sat, Oct 15, 2016 at 2:00 AM, Martin Maechler <maechler at stat.math.ethz.ch> wrote: >>>>>> Michael Lawrence <lawrence.michael at gene.com> >>>>>> on Wed, 12 Oct 2016 15:21:13 -0700 writes: > > > Thanks, this was what I expected. There is a desire to > > eliminate the usage of pairlist from user code, which > >
2016 Oct 12
2
How to assign NULL value to pairlist element while keeping it a pairlist?
Thanks, this was what I expected. There is a desire to eliminate the usage of pairlist from user code, which suggests the alternative of allowing for function arguments to be stored in lists. That's a much deeper change though. On Wed, Oct 12, 2016 at 12:31 PM, Henrik Bengtsson <henrik.bengtsson at gmail.com> wrote: > Michael, thanks for this info. > > I've stumbled upon
2008 Feb 27
1
Warnings generated by log2()/log10() are really large/takes a long time to display
x <- rnorm(1e6); y <- log(x); # or logb(x) or log1p(x) w <- warnings(); print(object.size(w)); ## [1] 480 str(w); $ NaNs produced: language log(x) - attr(*, "dots")= list() - attr(*, "class")= chr "warnings" y <- log2(x); # or log10(x) w <- warnings(); print(object.size(w)); ## [1] 8000536 str(w); ## List of 1 ## $ NaNs produced: language