[Rd] str2lang throws error when the string is empty

Dipterix Wang d|pter|x@w@ng @end|ng |rom gm@||@com
Fri Feb 11 12:55:44 CET 2022


Hi, 

str2lang("") raises an error in current version. Would it be good if it returns a missing value expression? One use-case would be to build an expression that subsets an array:

# Expected: x[index1, ]
as.call(list(quote(`[`), quote(x), quote(index1), str2lang("")))

Right now I'm using the following, which is ugly
as.call(list(quote(`[`), quote(x), quote(index1), alist(x=)[[1]]))

Thanks,
- Dipterix
	[[alternative HTML version deleted]]



More information about the R-devel mailing list