Hi there again, I have a problem with the "parse"-command. First of all, I show you in a simplified way, what I am trying to do and what "R" answers:> test[1] "u.g$par1, u.g$par2"> mode(test)[1] "character"> ausdruck <- parse(text = test)Error in parse(file, n, text, prompt) : syntax error in "u.g$par1," That is what I did and I can't find the mistake. I just want to have "test" without quotes (to do eval(ausdruck) later) but somehow it doesn't work. Is there anything I have overlooked? Can't I put special characters like "$" or "," into this test-character? Thanks a lot for your help. Best, Antje [[alternative HTML version deleted]]
Hello Antje,> Is there anything I have overlooked? Can't I put special characters > like "$" or "," into this test-character?If I understand "?parse" correctly, you are supposed to pass a valid R expression to it and "u.g$par1, u.g$par2" is not as the comma is not a valid delimiter here. However,> parse(text="u.g$par1; u.g$par2")expression(u.g$par1, u.g$par2) does work (note the semicolon instead of the comma) and might be what you want. Regards, Marc -- =======================================================Dipl. Inform. Med. Marc Kirchner Interdisciplinary Centre for Scientific Computing (IWR) Multidimensional Image Processing INF 368 University of Heidelberg D-69120 Heidelberg Tel: ++49-6221-54 87 97 Fax: ++49-6221-54 88 50 marc.kirchner at iwr.uni-heidelberg.de -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : https://stat.ethz.ch/pipermail/r-help/attachments/20051122/06546549/attachment.bin