Questions tagged as 'r'

3
answers

as.Date and srtptime commands in R

Suppose the following vector: datas=c("26/12/2014", "27/12/2014", "28/12/2014", "29/12/2014", "30/12/2014", "31/12/2014") When you apply the commands as.Date(datas, "%d/%m%y") and strptimes(datas, "%d/%m%y") the output is: "...
asked by 15.09.2015 / 16:22
1
answer

Website with R Markdown

I'm trying to create a site to post descriptive analyzes done in R, using the Hugo theme. However, after creating a .rmd post where I read a .csv file and do a series of reviews. I get this error when using the serve_site () or build_site () com...
asked by 13.09.2018 / 03:31
1
answer

R corrplot - coloring based on correlation values

I have a binary dataframe (53115 rows; 520 columns) and I want to make a correlation chart. I want to color the correlation values in red if they are greater than or equal to 0.95, otherwise blue. correl = abs(round(cor(bin_mat),2)) pdf("corr...
asked by 03.10.2018 / 03:08
1
answer

Truncation of values in R

I need to do a survey to find out how many employees currently earn equal to or above the INSS ceiling ($ 5531.31 in the base reference month). The bases that I have inform the contribution values of the server (11%) and the employer (22%), but...
asked by 22.02.2018 / 15:34
1
answer

R - How to calculate the price change from one period to the other?

Hello, I'd like to know how to calculate the price change from one period to the next. Example:    Year | Price       2007 | 25       2008 | 30       2009 | 7       2010 | 15 ... | ... | ... The new column would look like:    Ye...
asked by 03.04.2018 / 01:08
2
answers

Get the summary of results from the use of LOESS

I'd like to know how I can get the points that are generated by my curve. I'm having trouble getting the results of my last code statement. In addition, I got the maximum and minimum points of the curve, but I would also like to get the first...
asked by 21.09.2015 / 05:30
2
answers

In R, how to calculate the average of one column based on another?

I have the following XLSX table: I need to calculate the SP500 column average for each year. I did with 'mean (name $ SP500)' and found the total average. Now I need the average for each year. Anyone know how I can do it? Thanks!     
asked by 20.06.2018 / 18:09
1
answer

What does the function of %% and% any% in r?

I have been reading the documentation of R and in the document Arithmetic{base} , Arithmetic Operators I came across the %% that says to have the mod function, which I assumed was the modulo function, but when I executed it s...
asked by 19.06.2018 / 22:04
1
answer

Data Frame and Linear Regression

With this date frame I need to run some regressions. I want to do regressions with terms that are high to 3 and out of date. I searched the lm package and could not implement it. I want to, for example, rotate the first column in logarithm...
asked by 16.10.2015 / 18:06
1
answer

string transformation in R

I would like to know if I can make a remark about a string variable in upper case. For example: #como esta: x=c("Casa branca","Barco Azul","casa preta") > x [1] "Casa branca" "Barco Azul" "casa preta" #como ficaria: [1] "CASA BRANCA" "B...
asked by 15.01.2018 / 12:50