similar to: String manipulation and formatting

Displaying 20 results from an estimated 1000 matches similar to: "String manipulation and formatting"

2005 Jul 05
1
by (tapply) and for loop differences
I am getting a difference in results when running some analysis using by and tapply compare to using a for loop. I've tried searching the web but had no luck with the keywords I used. I've attached a simple example below to illustrates my problem. I get a difference in the mean of yvar, diff and the p-value using tapply & by compared to a for loop. I cannot see what I am doing wrong.
2003 Apr 25
1
Creating objects from values in a "meta" dataframe
I am trying to use a meta data set with information about some repetative analysis that I have to do for a variables measured on multiple occasions. I think the best way to explain the problem is by using a simplified example. So here goes: I have a data frame called "meta" say with the following content: Test Min Max Low High APS 0 40 -10 10 TPP 0 120 -8 8 NOS
2003 May 07
1
[R ] Query : problems with the arithmetic operator "^" wi th function "lme" and "lmList"
Dear Martin, Have you try to create a new variable for age squared, say agesq? If you fit the model using this new variable you should get the coefficients. So your new model is something like height~age+agesq I hope this helps, Saghir > -----Original Message----- > From: MARTIN Ludovic [SMTP:martinl@mathinfo.ens.univ-reims.fr] > Sent: Wednesday, 07 May, 2003 2:02 PM > To:
2003 Jul 24
3
R won't connect to the internet on Linux!
OK, I really am struggling with this one! Forgive me if I am being stupid.... I am running R 1.7.1 on Suse Linux 8.1. I connect to the internet through a proxy so I have: IAHC-LINUX03:~ # echo $http_proxy wwwcache.bbsrc.ac.uk:8080 IAHC-LINUX03:~ # echo $HTTP_PROXY wwwcache.bbsrc.ac.uk:8080 just in case ;-) SO, i go into R and I get: >
2003 Aug 12
8
capturing output from Win 98 shell
How can I best achieve the following (works in Splus): filenames <- dos("dir *.sasb7dat /b") What I am asking, more generically, is: how can I capture the output of a DOS command in R? I have tried using system("COMMAND.COM /c dir /b", intern=T, show.output.on.console=T) where intern: a logical, indicates whether to make the output of the command an R
2005 Mar 26
4
RGUI font problem (PR#7749)
Full_Name: Christos Hatzis Version: 2.0.1 patched (2005-02-18) OS: WinXP SP2 Submission from: (NULL) (24.61.19.101) I had encountered a similar problem when changing the font in the R Console and then then open the graphics device by plot(), the console window whites out. this might be related to bug report 7271. I mentioned it sometime back and was told is was not reproducible. Now I have
2006 Oct 26
3
help fo finding R package "utils"
Sir I have a problem that from which country i can assess R package "utils" for data entry for loading it in R Please help me in this regard. -- AMINA SHAHZADI Department of Statistics GC University Lahore, Pakistan. Email: amnakhan493@gmail.com amna_989@hotmail.com amna_989@yahoo.com [[alternative HTML version deleted]]
2007 Dec 11
5
book on regular expressions
Hello, Could someone recommend a good book on regular expressions with focus on applications/use as it might relate to R. I remember there was a mention of such a reference book recently, but I could not locate that message on the archive. Thanks. -Christos Christos Hatzis, Ph.D. Nuvera Biosciences, Inc. 400 West Cummings Park Suite 5350 Woburn, MA 01801 Tel: 781-938-3830
2007 May 16
2
'attach workspace' on R console File menu
Quite often I save misc functions and data objects as .RData files that I can use in other sessions. Although I could 'Load Workspace" these files, most of the times I prefer attaching them. It would be really convenient to have a menu item under the File menu on the Windows R Console to allow attaching workspaces, e.g. -------------------- Attach Workspace... Load Workspace... Save
2006 Dec 04
2
Library file for the R engine in Windows?
Hi, I am trying to use dynamic memory allocation in the C code to be called by R through the .C interface. I have used R_alloc as explained in the Writing R Extensions and included the R.h header. The program compiles fine but fails when linking. Obviously it needs a library file where R_alloc is found. I have tried to link by adding R.dll to list of files at the end of the link command but
2007 Feb 01
3
Lining up x-y datasets based on values of x
Hi, I was wondering if there is a direct approach for lining up 2-column matrices according to the values of the first column. An example and a brute-force approach is given below: x <- cbind(1:10, runif(10)) y <- cbind(5:14, runif(10)) z <- cbind((-4):5, runif(10)) xx <- seq( min(c(x[,1],y[,1],z[,1])), max(c(x[,1],y[,1],z[,1])), 1) w <- cbind(xx, matrix(rep(0, 3*length(xx)),
2006 Dec 24
2
how to 'get' an object that is part of a list
This might be an trivial thing but I am stuck. Consider: xx <- list(a=1:5, b=letters[1:5]) Although object xx is accessible through its name, how can object xx$b be accessed similarly through its name? > get("xx") $a [1] 1 2 3 4 5 $b [1] "a" "b" "c" "d" "e" > get("xx$b") Error in get(x, envir, mode, inherits)
2007 Feb 07
2
blank upper or lower triangle of cor-matrix
Dear altogether, I want to blank the lower (or upper) part of a correlation matrix as it is done by dist() example: ( d <- cor(matrix(runif(12),nrow=4)) ) If I do the following d[lower.tri(d)] <- "" of course everything is changed to character - that's not what should be. Additionally, it does not work to assign "0" or anything else. The same is true for
2006 Oct 24
2
Plotmath expression
Hello, I've been trying to plot a subscript in a text formula using plotmath but I haven't been able to do so. In my example below I would like the text label to show X[min] = 10.1 +/- 5.5 Here is the code: ll <- c(x=10.1, sde=5.5) plot(1:10) text(x=9, y=2, pos=2, expression(paste(X[min], "=", paste(ll, collapse="+/-")))) This works fine up to the inner paste
2006 Dec 03
1
passing matrix as argument to a C function
Hi, Although this is not directly an R-related question, it is relevant as I am trying to port some R code to C to speed things up in a computation. I am working through my first attempts to generate and link compiled C code in R. I could make the 'convolve' function to work and similar functions that take vectors as arguments. In my application I need to pass a couple of matrices to
2009 Sep 10
1
importing/loading package without a namespace
I am developing a package that imports some functions from another package. The imported package (qcc) does not have a namespace and this is causing problems with loading of my package, which has a namespace. Is there a workaround to allow loading the namespace-less package? I searched the archives and found a suggestion that the package should be included in the Depends list, but this has not
2006 Nov 20
2
predict.coxph
Hi everyone, Can anyone give me more details about the 'lp', 'risk', 'terms', and 'expected' options from the predict.coxph function? I actually found that risk is obtained from exp(lp). I can't find information on 'expected' type however. Is anybody can expand the information on this function? Thank you in advance, I will appreciate it.
2009 Nov 13
4
Installing R on RedHat EL 5
Hi, I am totally new to Linux and trying to install R and related tools. I downloaded the rpm files for el4/x86_64 from the CRAN repository and tried to run rpm but it did not go through complaining about dependencies. Do all the listed rpm files need to be installed? What is the order in which these need to be installed? I appreciate any help with this or any suggestions for alternate ways
2007 Apr 26
2
Extract p-value from survdiff function
Hi list, I want to use the p-value from the survdiff function (package survival) to reuse within a function in a Kaplan-Meier plot. The p-value is somehow not a component of the value list ?! Thanks in advance -- A. Goralczyk G?ttingen, Ger.
2007 Feb 01
1
Loading functions in R
Hi all, This information must be out there, but I can't seem to find it. What I want to do is to store functions I've created (as .R files or in whatever form) and then load them when I need them (or on startup) so that I can access without cluttering my program with the function code. This seems like it should be easy, but.... Thanks! Jeff