##EDIT: SOLVED. It turns out function() really dislikes length(.)=1 entries that are numeric vectors.
#I had to add:
#to make it work.. even though when I took off the function() notation and ran the code out on t<-2, it worked fine!
#Hi, R newb here. I've coded a function that inputs N dimensional array(s) [or class=numeric if it's dim=1] of #coefficients and tstats, where dim(coef_matrix)=dim(tstat_matrix), it will then output a same dimension matrix of #coefficients pasted to tstats in brackets pasted to significance stars.
#The problem is it works maybe 30% of the time when I'm trying to do something like:
#Yet, when I actually go INSIDE The function and set
#Then actually copy and paste the CONTENTS of the function into the R console, it works 100% of the time.