Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Text loop for X-axis in time series. Example 2002-2018 by quarters
#This method provides an useful way to loop a text. For example, you may want to use it as a tipical X-axis for economic analysis. In this code, you can mark the evolution of a certain variable during 2002-2018 by quarters. text=data.frame(1:4) years=c(2002:2018) index_quarters=c(1:4) quarters=c(1:4) for(i in 1:length(years)){ for(j in 1:length(quarters)){ quarters[j]=paste(years[i],"T",index_quarters[j],sep="") } for(k in 1:length(quarters)){ text[k,i]=quarters[k] } } text=as.data.frame(as.vector(as.matrix(text))) names(text)="Years by quarters" text
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
31-08-2020-Exemplo AjusteNaoL
Kruskal Wallis test
Grad-sistema
Grad-sistemab
Arithmetic operations in vector
Test
ceiling.r
AjusteNaoLinear11-02-21
%95 confidence interval
Dynamic Simulation for Bank - Exercise 3 in 1.7
Please log in to post a comment.