similar to: Search and convert string function

Displaying 20 results from an estimated 4000 matches similar to: "Search and convert string function"

2013 Feb 09
2
character strings with embedded commands: perl "/gee" ?
dear R experts---I am trying to replicate a perl feature. I want to be able to embed R commands inside a character string, and have the string be printed with the command executed. my perl equivalent is my $a=10; my $teststring = "the expression, $a+1, is ::$a+1::, but add one more for ::$a+2::\n"; $teststring =~ s/::(.*?)::/$1/gee; print $teststring; of course, R does not use
2005 Jul 18
1
levels() deletes other attributes
Dear All, it seems to me that levels() deletes other attributes. See the following example: ## example with levels f1 <- factor(c('level c','level b','level a','level c'), ordered=TRUE) attr(f1, 'testattribute') <- 'teststring' attributes(f1) levels(f1) <- c('L-A', 'L-B', 'L-C') attributes(f1) If I run it, after
2004 Dec 02
1
SJava convert problem
Consider this Java class: class myClass { final public static String[] testString () { return new String[]{"my", "name", "is"} ; } final public static int[] testInt () { return new int[]{5, 10, 15}; } final public static char[] testChar () { return new char[]{'x', 'y', 'z'}; } }
2011 Aug 23
1
Implementing a "plugin" paradigm with R methods
Dear list, I was wondering how to best implement some sort of a "plugin" paradigm using R methods and the dispatcher: Say we have a function/method ('foo') that does something useful, but that should be open for extension in ONE specific area by OTHERS using my package. Of course they could go ahead and write a whole new 'foo' method including the features they'd
2009 Dec 02
1
read.csv confused by newline characters in header (PR#14103)
Full_Name: George Russell Version: 2.10.0 OS: Microsoft Windows XP Service Pack 2 Submission from: (NULL) (217.111.3.131) The following code (typed into R --vanilla) testString <- '"B1\nB2"\n1\n' con <- textConnection(testString) tab <- read.csv(con,stringsAsFactors = FALSE) produces a data frame with with one row and one column; the name of the column is
2011 Apr 30
3
Copying to R a rectangular array from a Java class
Bare test code: My simple Java test class source and R test code follow: public class RJavTest { public static void main(String[]args) { RJavTest rJavTest=new RJavTest(); } public final static String conStg="testString"; public final static double con0dbl=10000001; public final static double[]con1Arr=new double[] { 10001,10002,10003,10004,10005,10006 }; public final static
2005 Mar 22
1
I modify my question in "textconnection output"
dear ALL-R-helper: I modify my question in "textconnection output": I wrote one function in Rgui: output <- function(y){ x <- textConnection("foo","w") sink(x) a <-5 b <-6 z <-a*b z e <-"spss" h <-c(1,2,3) ls() r<-c("s","p","s","s") p<-list(1:10) p y <- foo sink()
2007 Dec 11
1
unescapeHTML return incorrect string under firefox
function testUnescapeHTML() { var testString = "<div>&lt;a hrer="#"&gt;test&lt;/a&gt;</div>" } this simple test function return string "<div><a href="#">test</a></ div>" under internet explorer,and return "<a herf="#">test</a>" under firefox(strip <div> pair), how can
2005 May 07
4
string syntactic sugar in R? - long post
Currently in R, constructing a string containing values of variables is done using 'paste' and can be an error-prone and traumatic experience. For example, when constructing a db query we have to write, paste("SELECT " value " FROM table where date ='",cdate,"'") we are getting null result from it, because without (forgotten...)
2010 Jun 14
3
remove last char of a text string
Dear R experts, is there a simple way to remove the last char of a text string? substr() function use as parameter start end only... but my strings are of different length... 01asap05a -> 01asap05 02ee04b -> 02ee04 Thank you all, Gianandrea -- View this message in context: http://r.789695.n4.nabble.com/remove-last-char-of-a-text-string-tp2254377p2254377.html Sent from the R help mailing
2009 Dec 04
0
(PR#14103) read.csv confused by newline characters in
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --27464147-536455723-1259929222=:18586 Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8BIT Content-ID: <alpine.LFD.2.00.0912041222341.18586 at gannet.stats.ox.ac.uk> It's not to do with pushback per
2014 Sep 24
1
[PATCH 1/2] allow path to envyas binary to be specified
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> --- src/shader/Makefile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/shader/Makefile b/src/shader/Makefile index 46658e9..2d789be 100644 --- a/src/shader/Makefile +++ b/src/shader/Makefile @@ -24,20 +24,21 @@ NVF0_SHADERS = xfrm2nvf0.vpc \ videonvf0.fpc SHADERS = $(NVC0_SHADERS)
2005 Jul 20
2
unable to call R t-test from Java
Hello, My colleague and I would like to write Java code that invokes R to do a simple TTest. I've included my sample java code below. I tried various alternatives and am unable to pass a vector to the TTest method. In my investigation, I tried to call other R methods that take vectors and also ran into various degrees of failure. Any insight you can provide or other Web references you
2001 Oct 22
3
round() doesnt (PR#1138)
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
2006 Jan 06
2
sudoku
Any doubts about R's big-league status should be put to rest, now that we have a Sudoku Puzzle Solver. Take that, SAS! See package "sudoku" on CRAN. The package could really use a puzzle generator -- contributors are welcome! -- David Brahm (brahm at alum.mit.edu) [[alternative HTML version deleted]] _______________________________________________ R-packages mailing list
2006 Jan 06
2
sudoku
Any doubts about R's big-league status should be put to rest, now that we have a Sudoku Puzzle Solver. Take that, SAS! See package "sudoku" on CRAN. The package could really use a puzzle generator -- contributors are welcome! -- David Brahm (brahm at alum.mit.edu) [[alternative HTML version deleted]] _______________________________________________ R-packages mailing list
2002 Mar 08
4
ARMA and ARIMA modeling
I'd like to play with ARIMA models of stock prices, but I am a complete novice. Could some kind soul explain the relationship among packages "ts", "tseries", "dse", "dse2", and "fracdiff"? Are they 'competing' products or does one depend on another? Where would be the best place for a novice to begin? Thanks for any advice. PS. I
2010 Apr 12
2
[LLVMdev] Why function pointer is different from other data type?
I'm sorry that I should remove the comment. In fact my question is about the "float (i32)* (float (i32)*)*", why we use this kind of return type instead of just "float (i32)*". Thanks a lot. Hao On Mon, Apr 12, 2010 at 5:42 PM, Duncan Sands <baldrick at free.fr> wrote: > Hi Hao Shen, > >> %4 = call float (i32)* (float (i32)*)* @get_ptr(float (i32)* @a1)
2023 Jan 26
1
akima interp results to zero with less than 10 values
The akima package has a problematic license (it doesn't allow commercial use), so it's been recommended that people use the interp package instead. When I use interp::interp instead of akima::interp, I get reasonable output from your example. So that's another reason to drop akima... Duncan Murdoch On 26/01/2023 9:35 a.m., PIKAL Petr wrote: > Dear all > > I have this
2015 Jul 18
4
[LLVMdev] How can i differentiate pointer type int 32* from int 32** ?
John, thanks for your helpful advice. My ultimate goal is to construct a full instruction-level program dependence graph for a given IR file. The hard point is how to establish the correct data dependence edges when some function arguments are multi-level pointers. To solve this problem I hope to check the point-to level for each pointer variable. I think the data dependence through pointers can