Imported an Excel database for R and need to transform them into time series so that you can analyze them. However, when I make the transformation to time series, the R changes the original values to totally different ones. Here are the steps I used
to import data:
variavel=read.table("dados.csv", header=T, sep=";", dec=",")
After importing the data, the values appeared correctly in the assigned variable, being values of type 5.547,18 ...
to transform data into time series:
library(tseries)# carregando o pacote séries temporais
ts.variavel=ts(variavel, start=c(2000,1), frequency=12) # fazendo a transformação
After the above transformation, when I will query the data they appear fully changed, for example, the value of 5,547.18 turned 15, the value 5344.47 turned 7, the value 5.053.42 turned 2 and so on. Strange, is not it ?! What am I doing wrong?