Re: [R] Error with toString
Romain, to keep it simple, I reproduced the example that you can find in the toString function help and I still got the same error: x - c(a, b, aaa) toString(x) Error in toString(x) : could not find function .jcall - Anna Lippel -- View this message in context: http://n4.nabble.com/Error-with-toString-tp1290327p1460119.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error with toString
What packages are loaded? On the basic system, it works fine: toString(123) [1] 123 toString(c('a', 'b', 'zz')) [1] a, b, zz On Tue, Feb 2, 2010 at 12:17 PM, anna lippelann...@hotmail.com wrote: Romain, to keep it simple, I reproduced the example that you can find in the toString function help and I still got the same error: x - c(a, b, aaa) toString(x) Error in toString(x) : could not find function .jcall - Anna Lippel -- View this message in context: http://n4.nabble.com/Error-with-toString-tp1290327p1460119.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve? __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error with toString
anna wrote: Romain, to keep it simple, I reproduced the example that you can find in the toString function help and I still got the same error: x - c(a, b, aaa) toString(x) Error in toString(x) : could not find function .jcall .jcall() is an rJava function. toString() is a base R function. I'm guessing that you're doing this as part of some code that involves rJava. In that case you will have to provide more details. The example you cite above works perfectly well for me. -Peter Ehlers - Anna Lippel -- Peter Ehlers University of Calgary __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error with toString
Here is the list of the loaded packages: package:lattice package:fSeries [5] package:fCalendarpackage:fEcofin package:fUtilities package:MASS [9] package:robustbase package:caTools package:PerformanceAnalytics package:xts [13] package:xlsReadWrite package:RBloomberg package:RUnitpackage:bitops [17] package:zoo package:stats package:graphics package:grDevices [21] package:datasets package:rcom package:rscproxy package:utils [25] package:methods package:base - Anna Lippel -- View this message in context: http://n4.nabble.com/Error-with-toString-tp1290327p1460190.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error with toString
No I just did it on the R console, I built the vector just before. - Anna Lippel -- View this message in context: http://n4.nabble.com/Error-with-toString-tp1290327p1460192.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error with toString
Anna, Try omitting pkg:RBloomberg. If you really need to use that package, you will have to install the non-CRAN package RDCOMClient from omegahat. I still don't see why toString() wouldn't do its job, even with RBloomberg loaded. -Peter Ehlers anna wrote: Here is the list of the loaded packages: package:lattice package:fSeries [5] package:fCalendarpackage:fEcofin package:fUtilities package:MASS [9] package:robustbase package:caTools package:PerformanceAnalytics package:xts [13] package:xlsReadWrite package:RBloomberg package:RUnitpackage:bitops [17] package:zoo package:stats package:graphics package:grDevices [21] package:datasets package:rcom package:rscproxy package:utils [25] package:methods package:base - Anna Lippel -- Peter Ehlers University of Calgary __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error with toString
isn't there a way to specify from which library I am taking the method from...like rjava.toString or base.toString.. - Anna Lippel -- View this message in context: http://n4.nabble.com/Error-with-toString-tp1290327p1460262.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error with toString
Try: base::toString On Tue, Feb 2, 2010 at 5:16 PM, anna lippelann...@hotmail.com wrote: isn't there a way to specify from which library I am taking the method from...like rjava.toString or base.toString.. - Anna Lippel -- View this message in context: http://n4.nabble.com/Error-with-toString-tp1290327p1460262.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40 S 49° 16' 22 O __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error with toString
ok so this way it worked...it's probably calling the toString function from another package but I don't understand which one...obrigadinha Henrique! - Anna Lippel -- View this message in context: http://n4.nabble.com/Error-with-toString-tp1290327p1460286.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error with toString
I don't think that rJava has a toString function. It does use the function in base. I see a function toString.XMLNode() in the XML package which is used as toString(x), so maybe that's where your problem lies; but I didn't see the XML package in your list of attached packages. Anyway, here are two suggestions: 1. to answer your question directly: use base::toString(x) to enforce use of that function. 2. try methods('toString') to see what other toString()'s you may have around. -Peter Ehlers anna wrote: isn't there a way to specify from which library I am taking the method from...like rjava.toString or base.toString.. - Anna Lippel -- Peter Ehlers University of Calgary __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error with toString
Peter, here is what I get for methods('toString'): [1] toString.default Warning message: In methods(toString) : function 'toString' appears not to be generic - Anna Lippel -- View this message in context: http://n4.nabble.com/Error-with-toString-tp1290327p1460296.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error with toString
You have another toString function hanging around. Your result is exactly what I get from methods('toString') after I define toString - function(x) x You could try getAnywhere('toString') -Peter anna wrote: Peter, here is what I get for methods('toString'): [1] toString.default Warning message: In methods(toString) : function 'toString' appears not to be generic - Anna Lippel -- Peter Ehlers University of Calgary __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error with toString
Ok Peter I think you were right about pointing out the RBloomberg package because here is what I get with getAnywhere('toString'): 2 differing objects matching ‘toString’ were found in the following places package:RBloomberg package:base namespace:base Use [] to view one of them Warning messages: 1: In identical(objs2[[i]], objs2[[j]]) : ignoring non-pairlist attributes 2: In identical(objs2[[i]], objs2[[j]]) : ignoring non-pairlist attributes :) - Anna Lippel -- View this message in context: http://n4.nabble.com/Error-with-toString-tp1290327p1460373.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error with toString
On 01/26/2010 03:09 PM, anna wrote: Hello there, I want to create a string from strings and numbers, here is my code: str- name toString(20) Where did you get that syntax from ? You need to use paste. paste( name, 20 ) [1] name 20 but it returns me this error: Error in toString(20) : could not find function .jcall what did I do wrong? I couldn't find this error anywhere... .jcall is in rJava, but rJava never calls toString. Can you attach a bit more information as requested by the posting guide : http://www.r-project.org/posting-guide.html Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/KfKn : Rcpp 0.7.2 |- http://tr.im/JOlc : External pointers with Rcpp `- http://tr.im/JFqa : R Journal, Volume 1/2, December 2009 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error with toString
?paste is a logical operator, not string concatenation. On Tue, Jan 26, 2010 at 9:09 AM, anna lippelann...@hotmail.com wrote: Hello there, I want to create a string from strings and numbers, here is my code: str - name toString(20) but it returns me this error: Error in toString(20) : could not find function .jcall what did I do wrong? I couldn't find this error anywhere... -- View this message in context: http://n4.nabble.com/Error-with-toString-tp1290327p1290327.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve? __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error with toString
name toString(20) is from Excel or OpenOffice; means 'logical and' in R, not string concatenation. paste() is simpler; sprintf() is more precise as to decimal places and format. anna lippelann...@hotmail.com 26/01/2010 14:09:15 Hello there, I want to create a string from strings and numbers, here is my code: str - name toString(20) but it returns me this error: Error in toString(20) : could not find function .jcall what did I do wrong? I couldn't find this error anywhere... -- *** This email and any attachments are confidential. Any use...{{dropped:8}} __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error with toString
thanks! I thought it was a concatenator like in vb -- View this message in context: http://n4.nabble.com/Error-with-toString-tp1290327p1292949.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error with toString
Romain, I used the paste for numbers to as you told me and it worked. For the toString() function well I called it from the R console and that's what it returned me... -- View this message in context: http://n4.nabble.com/Error-with-toString-tp1290327p1293039.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error with toString
On 01/26/2010 04:19 PM, anna wrote: Romain, I used the paste for numbers to as you told me and it worked. For the toString() function well I called it from the R console and that's what it returned me... Yes. I understood that the first time. and I asked you to provide more details about your session to help diagnose the problem better. I can figure out on my own that you typed it at the console. What I cannot figure out is details of your session. Please read the posting guide, follow it and come back with the details if you want someone to help. You might want to read An Introduction to R too, because R is nothing like vb. Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/KfKn : Rcpp 0.7.2 |- http://tr.im/JOlc : External pointers with Rcpp `- http://tr.im/JFqa : R Journal, Volume 1/2, December 2009 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.