infile<-"http://datayyy.com/data_R/ibmBS.RData"
a<-load(url(infile))
print(a)
BS<-.x
infile<-"http://datayyy.com/data_R/ibmIS.RData"
a<-load(url(infile))
print(a)
IS<-.x

namesIS<- toupper(rownames(IS))
namesBS<-toupper(rownames(BS))

p<-"net income"
netIncome<-IS[grep(toupper(p),namesIS),]
print(netIncome)

p<-"Common Stock equity"
equity<-BS[grep(toupper(p),namesBS),]

print(equity)
netIncome2<-as.numeric(netIncome[1,])

equity2<-as.numeric(equity)
ROE<-netIncome2/equity2
print(" ---- ROE ---------------")
print(ROE)
#
TA<- toupper("Total Assets")
totalAssets<-BS[grep(TA,namesBS),]
totalAssets
print(" ---- ROA ---------------")
ROA<-netIncome[,1]/totalAssets
print(ROA)



