I am trying to make staircase of given length n using the following function:
hash<-function(n){
for (i in 1:n){
v1=c()
#j=1
for (j in 1:i){
v1=paste("#",v1,sep="")
}
cat(v1,"\n")
}
}
But I want it right aligned. What I am getting is:
#
##
###
####
#####
######
I was wondering, can I get some help how to make it aligned the other way?thanks for the assistance.