Re: [R] help with sqldf

2020-06-28 Thread Yuan Chun Ding
Thank you, Sarah, I modified your suggestion a little and it works. Ding -Original Message- From: Sarah Goslee [mailto:sarah.gos...@gmail.com] Sent: Sunday, June 28, 2020 2:01 PM To: Yuan Chun Ding Cc: r-help@r-project.org Subject: Re: [R] help with sqldf [Attention: This email came

Re: [R] help with sqldf

2020-06-28 Thread Sarah Goslee
WIthout knowing anything about your research domain, take a look at what your sql looks like: "select * from r where V1 like markerinfo$flank1[1] " You are asking to match literally "markerinfo$flank1[1]" and not the R object referred to. Try something more like, paste("select * from r where V1

[R] help with sqldf

2020-06-28 Thread Yuan Chun Ding
Hi R Users, I tried to use sql in R; test1 works well, library(sqldf) test1 <- sqldf("select * from r where V1 like '%GCCATGTCAGCACACTACC%TGAAACCTTTAACTATTT%'") test2 <- sqldf("select * from r where V1 like markerinfo$flank1[1] ") but I want to store the search content in a markerinfo file as