Code to generate ibmBS.RData
///////////////////////////////

infile<-"e://ibmBS_22jul2024.txt"
x<-readLines(infile)
length(x)
x2<-x[nchar(x)!=0]

x3<-x2[-1]
n<-grep("[a-zA-Z]",x3)# find out all items/starting subscript
diff(n)               # all the numbers should be 6
#
names<-x3[n]  
final<-names

for(i in 1:5) {    # 5 
  final<-data.frame(final,x3[n+i])
}
colnames(final)<-c("ITEM","2023","2022","2021","2020","2019")
rownames(final)<-final$ITEM
final2<-final[,c(-1,-6)]

n<-nrow(final2)
m<-ncol(final2)
.x<-matrix(rep(NA,n*m),n,m)
           
for(i in 1:n){
   for(j in 1:m){
       a<-gsub(",","",final2[i,j])
       .x[i,j]<-as.numeric(a)
   }
}

.x<-data.frame(.x)
rownames(.x)<-rownames(final2)
colnames(.x)<-colnames(final2)
save(.x,file="ibmBS22jul2024.RData")
/////////////////////////////////

Generate ibmIS.RData
///////////////////////////////

infile<-'d://ibmIncomeStatement22jul2024.txt'
x<-readLines(infile)
length(x)
x2<-x[nchar(x)!=0]
x3<-x2[-1]
n<-grep("[a-zA-Z]",x3) # find out all items/starting subscript
diff(n)                  # all the numbers should be 6
#
names<-x3[n]  
final<-names
for(i in 1:6) {    # 5 
  final<-data.frame(final,x3[n+i])
}
colnames(final)<-c("ITEM","2023","2022","2021","2020","2019","haha")
.x<-final[,-7]
save(.x,file="ibmIS22jul2024.RData")

/////////////////////////////////

///////////////////////////////

infile<-'d://ibmCashFlowStatement22jul2024.txt'
x<-readLines(infile)
length(x)
x2<-x[nchar(x)!=0]
x3<-x2[-1]
n<-grep("[a-zA-Z]",x3) # find out all items/starting subscript
diff(n)                  # all the numbers should be 6
#
names<-x3[n]  
final<-names
for(i in 1:6) {    # 5 
  final<-data.frame(final,x3[n+i])
}
colnames(final)<-c("ITEM","2023","2022","2021","2020","2019","haha")
.x<-final[,-7]
save(.x,file="ibmCF22jul2024.RData")


/////////////////////////////////

///////////////////////////////

> help(package=quantmod)
> x<-viewFin(getFin("DELL",auto.assign=FALSE),"BS","A")
Error: ‘getFinancials.google’ is defunct.
Google Finance stopped providing data in March, 2018.
You could try some of the data sources via Quandl instead.
See help("Defunct") and help("quantmod-defunct")

/////////////////////////////////