Hi all, back again, [Quick version] How do I concatenate two string to produce a third? Does the underlying representation of "character" allow this? [Long version] One thing I want to do with my database is to compare each record pairwise, without loading the whole database in memory....so I what I would like to do first query to get a list of strings which are the of the database primary key column, and then generate the cross product of that list with itself (which I can use "outer" for right?) then I need to generate queries based on those pairs of strings. Only problem is that I have the strings but how can I generate the query string I need? That is: nameX<-"YWL04A" nameY<-"YWL321" in python or perl I'd write something like: sql.select(column="*", from="gasch", where="NAME IS LIKE " + nameX " OR NAME IS LIKE " + nameY) (P.S. I am not sure but I don't think that the search option is working on the mailing list archives, just in case no one has reported it) Again I am sure there is a simple answer for this (I would've guessed they'd be functions like "character.cat" or something..then again I hope I am not assuming too much of the author's of R by asking them for all sorts of nifty string stuff) Thanks again, (I am subscribed now so there is no need to email) Maneesh -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help 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-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>From owner-r-help at stat.math.ethz.ch Wed Jul 18 18:42:20 2001 >[Quick version] >How do I concatenate two string to produce a third? >Does the underlying representation of "character" allow this?[Quick answer] paste() -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help 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-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Hi> [Quick version] > How do I concatenate two string to produce a third? > Does the underlying representation of "character" allow this?[Quick answer] For concatenating strings, use paste(). For example ... > paste("any", "number", "of", "strings") [1] "any number of strings" > paste("any", "number", "of", "strings", sep="") [1] "anynumberofstrings" ... and there are other "nifty" string manipulators such as substr(), nchar(), and strsplit(), and even grep(), regexpr(), sub(), and gsub() Paul -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help 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-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._