Hello, I have a data crunching program which causes me a problem. Some of the data are identified with an & sign followed by a integer. No problem is experienced when analysing data below &500, but value above are ignored. Is there some limitation in R on this topic? Many thanks for your help. Best regards. Constant Depi?reux Managing Director Applied Quality Technologies Europe sprl Mobile:+32 (0)475 555 818 Courriel: constant.depiereux at aqte-consulting.eu Site: http://www.aqte-consulting.eu
On 10-Apr-07 07:48:38, Constant Depi?reux wrote:> Hello, > > I have a data crunching program which causes me a problem. > > Some of the data are identified with an & sign followed by a integer. > No problem is experienced when analysing data below &500, but value > above are ignored. > > Is there some limitation in R on this topic?I think we need some clarification -- un peu pr?ciser le contexte! What is the syntax of the way "&500" (or other) is used to identify the data? What code do you use to recognise "&500" (or other) as an identifier? It might be possible that something in your code causes "&" to be recognised as the R operator for logical conjunction which (depending on your code) returns FALSE in some cases; but it is difficult to see how "xxxx&500" can be TRUE, but "xxxx&501" FALSE! Best wishes, Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <ted.harding at nessie.mcc.ac.uk> Fax-to-email: +44 (0)870 094 0861 Date: 10-Apr-07 Time: 10:28:10 ------------------------------ XFMail ------------------------------
Read the data in as a string and then remove the "&" with 'gsub'. What does your data file look like and how big is it? It would be useful to provide a sample of your data so we could answer the question easier. On 4/10/07, Constant Depi?reux <constant.depiereux at aqte.be> wrote:> Hello, > > I have a data crunching program which causes me a problem. > > Some of the data are identified with an & sign followed by a integer. > No problem is experienced when analysing data below &500, but value > above are ignored. > > Is there some limitation in R on this topic? > > Many thanks for your help. > > Best regards. > > > > Constant Depi?reux > Managing Director > Applied Quality Technologies Europe sprl > Mobile:+32 (0)475 555 818 > Courriel: constant.depiereux at aqte-consulting.eu > Site: http://www.aqte-consulting.eu > > ______________________________________________ > R-help at stat.math.ethz.ch 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 you are trying to solve?
Constant Depi?reux wrote:> Hello, > > I have a data crunching program which causes me a problem. > > Some of the data are identified with an & sign followed by a integer. > No problem is experienced when analysing data below &500, but value > above are ignored. > > Is there some limitation in R on this topic? >Hi Constant, As Ted replied, the question is somewhat mysterious. Are these data from something like MS VBA code, where variable types can be specified with a number of prefixed symbols? If it is just a quirk of the data format and you know that the ampersand is always followed by an integer (or a float or a double...) you could just discard the ampersand when reading the data file. gsub("&","",incoming_data) Fancier substitutions that will not discard ampersands that are needed are left to someone with a head for regular expressions Jim