R/addSynonym.R

Defines functions addSynonym

Documented in addSynonym

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 29, 2017, 12:07 p.m.