search for: ltxt

Displaying 2 results from an estimated 2 matches for "ltxt".

Did you mean: ctxt
2007 Dec 03
2
interaction with C++ code (PR#10487)
...aracter data that is passed back from C++ code. A small example is the following C++ code and R functions. #include <sstream> extern "C" { void extracttxt( char **txt, int *nchars) { std::ostringstream oss; oss << "abcdefghij"; const char *ltxt=oss.str().c_str(); for (int j=0;j<*nchars;j++) *txt[j]=static_cast<char>(ltxt[j]); } } # begin R code dyn.load("test.so") "testtxt" <- function() { nchars <- 80 txt <- .C("extracttxt" ,character(nchars) ,as.int...
2010 Jul 22
2
how to write legend of a plot
Dear R Users, If we issue simple plot command in R we don't get legend of the plot automatically. For example, following lines plots two curves, but to write a legend of these two curves there is no simple command. I checked with ?legend but it seems bit complicated for me. Does anyone know how to get a legend in a simple way for following R plot. Thanks, Yogesh >plot (x,y,