Posts by Danilo Imbimbo • 533 points
20 posts
-
1
votes1
answer84
viewsQ: How to create a column with specific conditions?
I have a database that way: cod ano MUNICIPIO pmat 1 110001 1998 ALTA FLORESTA D OESTE NA 2 110001 1999 ALTA FLORESTA D OESTE NA 3 110001 2000 ALTA FLORESTA D OESTE NA 4 110001 2001 ALTA FLORESTA D…
rasked Danilo Imbimbo 533 -
5
votes2
answers961
viewsQ: How to convert string (in English) to date?
I have a data.frame with a column (mes) that represents the month and year of each observation that is in string form. I wanted to modify it to date so I could use proc in excel with date. How can I…
-
1
votes1
answer308
viewsQ: How to turn my data.frame into a time series?
My data frame is this: IPCA.X04.05.2017 IPCA.Beta.1 IPCA.Beta.2 IPCA.Beta.3 IPCA.Beta.4 IPCA.Lambda.1 IPCA.Lambda.2 2 IPCA 0,0526 0,0442 -0,1269 0,0524 1,3477 0,7203 My goal is to create a large…
rasked Danilo Imbimbo 533 -
4
votes3
answers1792
viewsQ: Columns with numbers of different rows, how to join?
I have some time series (monthly) that end in different months, for example, some end in March 2017, others in April 2017 and some even in May 2017, follows example: 228 2016-12-01 1.12 229…
rasked Danilo Imbimbo 533 -
1
votes2
answers5146
viewsQ: Merge two data.frames into one
I have a routine that the goal will always be the same; Every day it should read a file xlsx with all prices (historical series), pull from a given site the prices referring to the last update date,…
rasked Danilo Imbimbo 533 -
1
votes2
answers968
viewsA: Bat file to run file. r
As spoken by colleague Marcos Nunes: By default, Windows closes the terminal when some script finishes running. I recommend entering the terminal, navigating to where the file Prohort.R is (i.e.,…
-
3
votes2
answers968
viewsQ: Bat file to run file. r
I would like to use a . bat file to run a particular file. r daily with windows taskmanager, but I’m not getting it running. My steps are as follows: 1) open Notepad 2) enter code, which is…
-
2
votes2
answers135
viewsQ: Webscrape Scoring for Welfare
I needed to extract the information from this site for an excel file, which Members vote in favor, against, abstentions, finally. It’s a webscrape exc, but as I understand html I’m having a hard…
-
2
votes0
answers58
viewsQ: Error in submitting form
Good afternoon, I have a code that works for some forms on the web and I’m trying to reuse it on this site: http://www.anbima.associados.rtm/titulos-publicos/estrutura-a-termo/tp-estrutura-termo.asp…
-
1
votes1
answer671
viewsQ: Reorganize Order of Dataframe Lines
I have the respective data.frame in R: Produto Classificação Comum Quilo 1 ABACAXI HAVAI A GRAUDO 3,32 2,2 2 ABACAXI HAVAI B MEDIO 2,81 1,8 3 ABACAXI HAVAI C MIUDO 2,21 1,4 4 BANANA MACA - 4,5 1 5…
rasked Danilo Imbimbo 533 -
-1
votes2
answers1264
viewsQ: Calculation at a specific value of a dataframe?
Possessing this data set: Índice Produto Classificação Comum Quilo 1 2 ABACAXI HAVAI A GRAUDO 3,32 2,2 2 3 ABACAXI HAVAI B MEDIO 2,81 1,8 3 4 ABACAXI HAVAI C MIUDO 2,21 1,4 4 5 BANANA MACA - 4,5 1 5…
rasked Danilo Imbimbo 533 -
4
votes4
answers4556
viewsQ: How to change the order of appearance of Columns in a Data Frame?
I’ve got this df mounted on the R: Produto Classificação Comun Quilo Indice 1 ABACAXI HAVAI A GRAUDO 3,32 2,2 2 2 ABACAXI HAVAI B MEDIO 2,81 1,8 3 3 ABACAXI HAVAI C MIUDO 2,21 1,4 4 4 BANANA MACA -…
rasked Danilo Imbimbo 533 -
3
votes1
answer1345
viewsQ: How to keep only Dataframe-specific lines?
I have a code that enters a site, fills in a form and pulls a table, however, I want to delete some rows from this table that I don’t need. Let’s go to the code: #library's require(RCurl)…
-
0
votes1
answer231
viewsA: File download from filling a form
As discussed with the friend above, it was much easier than imagined the result: download.file("http://www.anbima.com.br/est_termo/CZ-down.asp", destfile = "")
-
3
votes1
answer231
viewsQ: File download from filling a form
I’m trying to access a site, fill out your form and download the file, but I’m encountering some difficulties. That’s my code so far: #library's require(rvest) #website url <-…
-
1
votes0
answers63
viewsQ: Internal server error, can anyone fix?
I set up a code to log into a website and download a spreadsheet, however, the connection has been closed, someone can help me? library(RCurl) curl = getCurlHandle() curlSetOpt(verbose = T,…
-
4
votes1
answer215
viewsQ: Error when trying to extract table from a site by R, how to resolve?
I’m using this code, I want to import the country table to the R: library(XML) url <- "http://en.wikipedia.org/wiki/List_of_countries_by_population" country_data <- readHTMLTable(url, which=2)…
-
2
votes0
answers54
viewsQ: Logging into site with R, what error?
I’m trying to log into a site, the value site is merely illustrative, someone knows why the function is not working? login <- function (xxxx_user, xxxx_pass) { url_login <-…
rasked Danilo Imbimbo 533 -
0
votes2
answers1241
viewsA: How to create a macro that enters the site and takes the data from the last day?
I was able to copy only the desired table in my spreadsheet with the code below: Sub AcessarSite() Dim IE As Object Set IE = CreateObject("InternetExplorer.application") With IE .Visible = True…
-
3
votes2
answers1241
viewsQ: How to create a macro that enters the site and takes the data from the last day?
Good afternoon, need to access a website and grab the data from the last day and copy them to a folder in excel, the site is highlighted in the macro below, but I don’t know how to proceed to select…