Re: [R] Fwd: sqldf not joining all the fields

2010-03-12 Thread David Winsemius
On Mar 12, 2010, at 2:15 PM, Natalie Van Zuydam wrote: Hi, I did quote the string and as I told read.table to strip.white I also tried it with no spaces. "ASPIRIN DISP AAH" %in% tsf_data$name [1] FALSE "ASPIRINDISPAAH" %in% tsf_data$name [1] FALSE I have looked at the last lines of my y_d

Re: [R] Fwd: sqldf not joining all the fields

2010-03-12 Thread Natalie Van Zuydam
Hi, I did quote the string and as I told read.table to strip.white I also tried it with no spaces. "ASPIRIN DISP AAH" %in% tsf_data$name [1] FALSE "ASPIRINDISPAAH" %in% tsf_data$name [1] FALSE I have looked at the last lines of my y_data object and there is a problem with the file that I'm goin

Re: [R] Fwd: sqldf not joining all the fields

2010-03-12 Thread Natalie Van Zuydam
842752|ASPIRIN DISP AAH|TABS|75MG|2.9 is taken directly from my y_data text file. If I search for ASPIRIN DISP AAH %in% y$name I get: FALSE. Despite the fact that it is there in the text file that I loaded into y. There must be a problem with my input. tsf_data <- read.table("feb09_267_presc_i

Re: [R] Fwd: sqldf not joining all the fields

2010-03-12 Thread Gabor Grothendieck
That is not so. 842752 does not exist in y$item_code and ASPIRIN has a code of 22730. > 842752 %in% y$item_code [1] FALSE > subset(y, name == "ASPIRIN") item_codename formulation_code strength bnf_code 850 22730 ASPIRIN TABS300MG4.7.1 855 22780 ASPIRIN

[R] Fwd: sqldf not joining all the fields

2010-03-12 Thread Natalie Van Zuydam
-- Forwarded message -- From: Natalie Van Zuydam Date: Fri, Mar 12, 2010 at 5:49 PM Subject: Re: [R] sqldf not joining all the fields To: David Winsemius Dear David I'm not sure what the problem is as for every item code there is a corresponding information in the y_data. For