Posts by Alexandre Sanches • 1,223 points
58 posts
-
2
votes1
answer159
viewsQ: Generate a calendar in R
I need to generate a calendar with working days in R, but only for the current year. I am using the package bizdays to generate the days, but do not know a way to select only the current year. I…
-
2
votes2
answers384
viewsQ: Download data from Stock Exchange tables in R
I have the following code, I need to download the data that is in the table, but the dataframe is always returning empty. library(tidyverse) library(rvest) library(bizdays) library(dplyr)…
-
5
votes1
answer298
viewsQ: Compare objects in R
I have two dataframes: atualizada PIMPF_Br_A_1_sa PIMPF_Br_A_2_sa 1995-01-01 74.35501 35.59109 1995-02-01 74.06131 35.43400 1995-03-01 74.06131 35.93259 and: atualizada PIMPF_Br_A_1_sa…
-
2
votes2
answers2044
viewsQ: Transpose a dataframe into R
I have a dataframe in R, columns have dates and values and rows have countries. LOCATION jan 1999 fev 1999 mar 1999 EU28 86.70000 85.50000 85.90000 JPN 99.76086 99.76086 101.47350 USA 90.87153…
-
2
votes1
answer149
viewsQ: Web Scraping on R
I have to download the table of this link: http://www2.bmf.com.br/pages/portal/bmfbovespa/lumis/lum-taxas-referenciais-bmf-ptBR.asp I’m trying to use the package rvest, however, to no avail.…
-
-1
votes1
answer49
viewsQ: How to insert a die in the last row of the list in R?
I have a list with some data and I need to make the moving average of the last 3 data available, what I am not able to do is to include the value of this average in the last line of my list. I’ve…
rasked Alexandre Sanches 1,223 -
1
votes2
answers634
viewsQ: How to include a value in the last line of a data.frame in R
I have a date.frame and a value in R, I needed this value to be included in the last row of a certain column of this date.frame. I’ve tested the function rbind but it didn’t work. x <- c(1:15) y…
rasked Alexandre Sanches 1,223 -
1
votes2
answers2399
viewsQ: How to replace semicolon by dot in a dataframe in R Studio
I am importing a CSV file where the data comes separated by commas, but I need to export them in the R pattern, which is the ".". I have tried using the function as.Numeric, but the values disappear…