options(repos="https://ftp.yz.yamagata-u.ac.jp/pub/cran/")
if(!require("BiocManager",quietly=T)){install.packages("BiocManager")}
x <- c("ChemmineR","ChemmineOB");for(i in x){
  if(!require(i,character.only=T)){
    BiocManager::install(i);library(i,character.only=T)}};rm(x,i)
ifname <- "DataTableChemicalStructure.csv"
data <- read.csv(ifname,stringsAsFactors=FALSE)
smiset <- as(data[,"SMILES"],"SMIset"); str(smiset)
cid(smiset) <- data[,"Name"]; str(smiset)
sdfset <- smiles2sdf(smiset)
props <- data[,c("Name","KNApSAcKID","StC")]
datablock(sdfset) <- props
write.SDF(sdfset,file="DataKNApSAcK.sdf")
view(sdfset)