Hi,
I want to make a program which could read my argument and then sum them up. I have already saved different characters which would be summed up by this function for example ( H=1, C=12, N=14, O=16)
I want my function to read my input as (HCNO). Please suggest me, how can i make this happen. Although i am able to creat a function but not with the input same as i have mentioned above. Function which i have made is as follows
carbon_number<-function(char1, char2,...){
formula<-sum(char1, char2,...)
return(formula)
}
In here input is- H,C,N,O
And i want my input as - HNCO
Thanks