similar to: Error with toString

Displaying 20 results from an estimated 1000 matches similar to: "Error with toString"

2010 Jan 14
1
how to call a function from C
Hi, In Rcpp, we now have a "Function" class to encapsulate functions (they cover all three kinds, but this may change). To call the function, what we do is generate a call with the function as the first node and then evaluate the call. SEXP stats = PROTECT( R_FindNamespace( mkString( "stats") ) ); SEXP rnorm = PROTECT( findVarInFrame( stats, install( "rnorm") ) )
2010 Jan 24
1
header files for R packages
I have 6 or 7 nice constants (for example 1852 meters per nautical mile) I would like to have available to 4 or 5 functions in an R package. In C this would just be a header .h file and I would just "include" I am stuck trying to figure out how to create something like a C header file for an R package. Any ideas?
2010 Jan 14
1
Logical function
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?... Nom : non disponible URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20100114/da4bc580/attachment.pl>
2010 Jan 19
2
Working with text data/text operators
Hello, Could someone tell me, how can I select from a dataframe only those columns whose names contain a certain text? For example, if the column names are "Bond1.Creditclass","Bond1.Price","Bond2.Creditclass","Bond2.Price", how do I select only the columns corresponding to Bond1? Thanks a lot, Mihai [[alternative HTML version deleted]]
2010 Feb 01
1
Number with fixed digit length - zero fill-up
Dear R-help members, I'm quite new to R and I apologize for my basic question, but I haven't been able to find a solution yet. I try to interpret vector entries as a binary code, but unfortunately every first digit which is zero disappears. So how can I set any number (e.g. x = 10110) to a 8-digit zero fill-up (x = 00010110) in order to address digit indices? Or other way round, how
2010 Jan 26
4
reading a string vector
Hi, I need to read a string vector in R which is like this "atgctaaaactaatcgtcccaacaattatattactaccac", but R seems to understand it as a unique vector input when I read in like x <- "atgctaaaactaatcgtcccaacaattatattactaccac". How do I unconcatenate it, so I can use each of the letters on my reading? Thanks, Beatriz -- View this message in context:
2010 Jan 23
1
matrix to a C function
Hi the list, Is there a way to give a matrix to a C function, and then to use it as a matrix ? I write a function to print a matrix, but I use it as a vector : 1. void printMatrix(double *mTraj,int *nbCol, int *nbLigne){ 2. int i=0,j=0; 3. for(i=0 ; i < *nbLigne ; i++){ 4. for(j=0 ; j < *nbCol ; j++){ 5. Rprintf(" %f",mTraj[i * *nbCol + j]); 6. } 7.
2010 Jan 22
2
Optimizing C code
Hi the list, I need to write some efficient distances function, so I read the code for the Euclidean distance. I do not understand the purpose of the line 11 : if x[i] and y[i] are not NA (line 9), can dev be NA ? Christophe #define both_FINITE(a,b) (R_FINITE(a) && R_FINITE(b)) #define both_non_NA(a,b) (!ISNAN(a) && !ISNAN(b)) 1. static double R_euclidean2(double *x, double
2010 Jan 22
2
R CMD check error with the GNU Scientific Library
I have been working on an R package that calls C code using .C(). I recently started including some functions from the GNU Scientific Library in my code. The code runs fine on my machine when not wrapped in the package. But I get the following error from "R CMD check" * checking whether the package can be loaded ... ERROR Loading required package: splancs Loading required package: sp
2010 Jan 14
5
Better way than an ifelse statement?
Hello All, I am trying to create a column of weights based off of factor levels from another column. I am using the weights to calculate L scores. Here is an example where the first column are scores, the second is my "factor" and the third I want to be a column of weights. I can do what I want with an ifelse statement (see below), but I am wondering if anyone knows of a cleaner way
2008 Oct 16
4
How to save/load RWeka models into/from a file?
Hi, I want to save a RWeka model into a file, in order to retrive it latter with a load function. See this example: library(RWeka) NB <- make_Weka_classifier("weka/classifiers/bayes/NaiveBayes") model<-NB(formula,data=data,...) # does not run but you get the idea save(model,file="model.dat") # simple save R command # ... load("model.dat") # load the model
2002 Aug 29
2
problem with toString
Hi, I am using R 1.5.1 under Windows 2000. I have a problem with the function toString: It seems not to work for longer vectors as expressions. This example works well: q1<-expression(c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)) toString(q1) I get: "c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)" => OK But this one does not:
2010 Feb 08
5
Fast way to determine number of lines in a file
Hi all, Is there a fast way to determine the number of lines in a file? I'm looking for something like count.lines analogous to count.fields. Hadley -- http://had.co.nz/
2016 Jul 26
3
Exportar datos en formato de Excel
Hola. En mi caso, no he podido resolver los problemas con el Java para usar XLConnect, que en los papeles me parece el mejor. Supongo que algo de la arquitectura del sistema o bien de la relación entre el Java, el R y el RStudio. Así que utilizo library(openxlsx) write.xlsx(datos, file = "EDA1.xlsx") #donde datos es el objeto que quiero guardar. Requiere instalar el RTools, según tipo y
2010 Jan 12
1
Problem with toString
Hi all, I got a problem with * "toString()"* function its behaving odd in some times most of the times its giving correct results but in peculier cases its giving results like *"愭]"* especially while i am working with c# +R-project thats also after getting some error like after trying to caliculate "*mean("NA")" * can any one help me why its
2010 Jan 09
1
Is nested namespace supported?
Could somebody let me know if there is nested name space supported? For example, is it possible to define a function in the name space 'nested_namespace' which is nested in the name space 'some_namespace'? some_namespace:::nested_namespace:::a_function() I checked Section 1.6 of R-exts.pdf. It seems that nested namespace is not supported, right?
2006 Apr 11
1
Changing character limit in deparse, as.character and toString
Dear R-help Listers, I am curious if there is some (hopefully easy) way to change the number of characters that can be converted to a single string via any of deparse, as.character or toString. It seems that the limit is 500 for all of these. I saw a previous post where Prof. Ripley suggested that it was a "trivial" change in the R internals to change as.character's limit from 60
2010 Mar 06
3
[LLVMdev] constness of APFloat::toString
Hi! I wonder if llvm::APFloat::toString() can be const since it should not modify the APFloat. -Jochen
2012 Oct 30
2
Java Exception error while reading large data in R from DB using RJDBC.
Dear List, Java Exception error while reading large data in R from DB using RJDBC. I am trying to read large data from DB table(Vectorwise), using RJDBC connection. I have tested the connection with small size data and was able to fetch DB tables using same connection(conn as in my code). Please suggest where am i going wrong or alternate option to solve such issues while reading large DB
2013 Sep 06
1
Java exception error (Jcheck) while running an R script
Dear all, I am facing a problem with running a script that i have written in R and i hope you can help me spot which exactly is the problem and how i can solve it. The error I get is the following: ---- Error in .jcheck(silent = FALSE) : Java Exception <no description because toString() failed>.jcall(row[[ir]], "Lorg/apache/poi/ss/usermodel/Cell;", "createCell",