R/addSynonym.R

addSynonym <- function(table, phrase, id){
	#Replace ' by ` in phrases
	phraseA <- gsub("'", "`", phrase)

	if(length(answer <- IgetSynonymID(getOption("odm.handler"), table=table, phrase=phraseA))>0) return(answer)
	id  <- getID(table, id, remove.special.character=FALSE)
	IaddSynonym(getOption("odm.handler"), table=table, phrase=phraseA, id=id)
	return(id)
}

Try the RObsDat package in your browser

Any scripts or data that you put into this service are public.

RObsDat documentation built on May 2, 2019, 5:55 p.m.