Jonathan Zhou <[EMAIL PROTECTED]> writes: > I was hoping someone could tell me how to convert multiple C character > strings into an R character vector.
Here's a quick untested sketch: char **yourStrings; int numStrings = /* the length of yourStrings */; int i; SEXP cvect; PROTECT(cvect = allocVector(STRSXP, numStrings)); for (i = 0; i < numStrings; i++) { SET_STRING_ELT(cvect, i, mkChar(yourStrings[i])); } UNPROTECT(cvect); return cvect; + seth -- Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center BioC: http://bioconductor.org/ Blog: http://userprimary.net/user/ ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel