Posts by RxT • 995 points
64 posts
-
0
votes0
answers14
viewsQ: Error inserting special characters in gmailr::gm_subject()
I prepared a script to automate the sending of emails using the gmailr. However, when I put some special character in the Email Subject, it sends only a sequence of codes instead. Example: Script:…
-
0
votes1
answer25
viewsQ: How to verify if an ID has different information in a period of time?
I have the following database: cnpj_root, affiliate (1 = matrix, 2 = affiliate), Uf, active_em_2017, active_em_2018, active_em_2019, active_em_2020 (NA= inactive, 1 = active). What I need: identify,…
-
-1
votes1
answer47
viewsQ: if Else - Does the position of the keys "{}" make a difference in the result?
I’m making web Scrapping from a website. And for that I need to check if a data.frame exists or not. Besides not being working, I realize that I have different results only changing the position of…
-
0
votes1
answer25
viewsA: Rselenium - How to click the check-box and then the Submit button
I got. Just replace the part that doesn’t work with: relo <- remote_driver$findElement(using = "xpath", value = "/html/body/section/div/div/ui-view/section/div/div[1]/form/div[8]/label")…
-
-1
votes1
answer25
viewsQ: Rselenium - How to click the check-box and then the Submit button
I’m trying to make a web scraping of the Central Bank website. To do this, I need to select an item from the drop-down menu, then mark a check box and then click the Submit button. But when I try to…
-
1
votes1
answer53
viewsQ: Identify the ID that has value at least one column for all rows
I have a data.frame with columns: cnpj, name, year, rop, des, Cax, pcld. I need to identify the cnpj that possess the value "1" in at least one of the columns rope, des, Cax and pcld for all years.…
-
0
votes1
answer75
viewsA: How to put an image (logo) in the Shiny dashboardHeader()?
They answered me in the OS in English. If you want to follow better, is here. Follows the code: ui <- dashboardPage( skin = "green", dashboardHeader(title = "Meu Site", # Configura a altura do…
-
1
votes1
answer75
viewsQ: How to put an image (logo) in the Shiny dashboardHeader()?
I’m making a website in Shiny and would like to put an image of the company logo on dashboardHeader(). Example: The logo would be under "My Website", between the dashboardSidebar() and the…
-
1
votes1
answer222
viewsA: Dynamic table using database and Shiny
Answering the first and third question: UI conditionalPanel( 'input.dataset === "EPE"', checkboxGroupInput("show_vars", "Selecione as variáveis:", names(EPE), selected = names(EPE))), mainPanel(…
-
1
votes1
answer33
viewsQ: Strategy to run regressions with many iterations without much RAM
I have a small database (872 Obs. of 27 variables). But the analysis that I need to make of this base ends up being very heavy, because it requires analysis of the iteration of many variables among…
-
1
votes1
answer23
viewsQ: Complete values of a column with values of the column itself in date.table
I have a data.table() with the following columns: municipality, year and pib_per_capta. (I actually have 30 more columns, but for example I think this is enough) The base is fully filled from 2005…
-
0
votes1
answer22
viewsQ: How to turn part of a column into another with data.table?
I have a data.table with a column that has the code of the municipalities (6 first characters) and the name of the municipalities (other characters). I would like to separate them, using data.table.…
-
0
votes0
answers186
viewsQ: How to install postgresql and pdAdmin4 in Pop! _OS (Linux)?
I’m trying to install postgresql and pgAdmin4 in Pop! _OS (based on Ubuntu) For this, I followed more or less the steps of this link: https://wiki.postgresql.org/wiki/Apt sudo apt-get install curl…
-
-1
votes2
answers104
viewsQ: How to identify the page number of a . pdf by something written on it?
I have a . pdf with 120 pages, each page is a certificate and the only difference between them is the name of the participant. I also have a . csv with the list of participants' names and e-mail…
-
1
votes0
answers249
viewsQ: I cannot use Packages after upgrading to R 4.0.2
Yesterday I updated the R version and used it normal $version.string [1] "R version 4.0.2 (2020-06-22)" This morning, when I went to use, messages appeared that the packages needed to be…
-
1
votes1
answer28
viewsQ: Why does R have multiple folders for Libraries?
I upgraded the version of R to 4.0 and am having problems with some libraries. Trying to fix it, I found the command .libPaths() > .libPaths() [1]…
-
0
votes1
answer40
viewsQ: How to identify if one observation is in the same group as another?
I have a date.frame with the columns: cnpj_root, id_m_f, municipio and Uf I need to check the amount of cnpj_root that exists in each municipality and check if the matrix (1) is in the same…
-
5
votes1
answer620
viewsQ: How to set a decimal display pattern in R?
I have a rmarkdown script that generates a report in . pdf. I would like to standardize the number of decimal places displayed, without needing to round() in every function. At the beginning of the…
-
4
votes1
answer63
viewsQ: Function to find complete word, but independent of position in string
I’m having trouble using the str_detect to capture part of a text. I need the str_detect take only the word "garlic", but regardless of her position in the string. Ex: "Brazilian garlic", "Brazilian…
-
0
votes2
answers64
viewsA: str_replace_all - how to find words by the first 3 letters of a string?
I understood what was wrong. The symbol ^ indicates only that the word should begin with these letters. The symbol is missing . indicating any character and symbol + indicating repeats of the last…
-
1
votes2
answers64
viewsQ: str_replace_all - how to find words by the first 3 letters of a string?
I have the following structure: library(stringr) filtro_palavras <- structure(list(palavras = c("cultivo", "produtos", "atacadista", "papel", "madeira", "água", "agrícola", "vestuário",…
-
3
votes2
answers72
viewsQ: How to turn a column with a sentence per row into a column where each row is a word of these phrases?
I have the following structure: structure(list(frases = c("agricultura pecuária e serviços relacionados", "produção de lavouras temporárias", "cultivo de cereais", "cultivo de arroz", "cultivo de…
-
0
votes1
answer58
viewsQ: How to use i no for value in a function?
I have the following code: select = Select(driver.find_element_by_id('Identificador')).select_by_visible_text('Maio/2019') form = driver.find_element_by_name('Formulario')…
-
2
votes1
answer53
viewsQ: Is it possible to check an error of a function with an if()?
I’m using the package gtrends to pull some data from google.. This package allows you to download 5 Keywords at a time. That’s why I’m using a for() However, some Keywords I need to query are not in…
-
0
votes1
answer317
viewsQ: Webscrap with Selenium - How to select content from a drop-down menu item with quotes in id
I see you have a similar question, but the answer still hasn’t helped me. I need to collect data from the Central Bank. For this, I need to download the files that are in a drop down, one at a time.…
-
1
votes1
answer53
views -
1
votes0
answers46
viewsQ: Creating a dummy column based on the value of other columns
I have a table with 200 columns. This table has columns that identify the individual (id) and year (year). I need to check if the id sent information that year. If 0, did not send. If 1, sent. For…
postgresqlasked RxT 995 -
4
votes1
answer101
viewsQ: Rmarkdown - How to create a . pdf with a different name than . Rmd?
I created a script in . Rmd that will be played for different years. So I would like to be able to change the name of the generated . pdf. As it is: Report File.Rmd generates Report.pdf How I would…
-
1
votes1
answer53
views -
5
votes1
answer82
viewsQ: R - Function to generate graphs and change axes
I need to display four charts several times in a Rmarkdown report. So I decided to create a function to plot the graphs. It was like this: gera_graficos <- function(base,var1,var2){ hist1 <-…
-
2
votes0
answers300
viewsQ: R - How to remove all installed packages?
I ran a script in R a while ago and ended up installing all the packages related to statistics. With this, every time I go to make an update, it ends up taking longer than necessary. Since I do not…
-
1
votes1
answer35
viewsQ: R and Postgresql - AND/OR and BEETWEN/NOT BEETWEN how to help logic?
I need to get some information from the postgresql database through R . However, the filters are not downloading what I want. I would like to download only the cnaes of companies with cadastral…
-
0
votes1
answer62
viewsA: Postgresql - Change multiple column names at once
I followed the tips of friends and decided as follows: imported the file in R and used the commands: library(stringr) Plano_Contas$CONTA <- str_c("COMMENT ON COLUMN…
postgresqlanswered RxT 995 -
0
votes1
answer62
viewsQ: Postgresql - Change multiple column names at once
I have a table in Postgresql with columns that are named "c0001", "c0992", "c3993", and so on. They start with c and then comes a "random number". I have a dictionary in . csv explaining each of…
postgresqlasked RxT 995 -
0
votes1
answer207
viewsA: pgAdmin - How to install "system Tray plugin"?
I installed the applet Collapsible Systray and solved. Now instead of the window, only an icon appears next to the clock.
-
-1
votes1
answer207
viewsQ: pgAdmin - How to install "system Tray plugin"?
I use pgAdmin 4 in Linux Mint 19.3. Whenever I open the program, in addition to the browser, a pop-up appears saying: Note: Installing a system Tray plugin will Prevent this window being Shown. I…
-
1
votes0
answers26
viewsQ: R and SQL - How to join a data.frame in R with a table in SQL?
I have a table in Postgresql that contains the column "cnae". I also have a data.frame in the R with columns "cnae" and "Description". I need to move the "Description" column up to the table in…
-
2
votes1
answer104
viewsA: SQL and R - Download data from a table with space in names and integer filter
I reversed the single quotes ' with the doubles " and it worked. PIA_Estab <- dbGetQuery(con,' SELECT * FROM rais.rais_estabelecimento WHERE "CNAE 2.0 Classe" BETWEEN 5000 AND 34000 ')…
-
1
votes1
answer104
viewsQ: SQL and R - Download data from a table with space in names and integer filter
I have a database in Postgresql and would like to download a table, but with some filters. The column 'CNAE 2.0 Class' is an integer. library(RPostgreSQL) PIA_Estab <- dbGetQuery(con," SELECT *…
-
4
votes1
answer363
viewsQ: R - How to turn values into percentages using Data.table?
I own a data.table() with the columns Region, year and Quantity. The amount is in total value, I would like to make them in percentage per year. What do I have: Região ano Quantidade Norte 2017 252…
-
1
votes4
answers264
viewsA: R - How to replace "." (dot) with " (space) in the column names of a Data.Table?
Worked out using: names(df) <- gsub(pattern, replace, names(df)) In my case: names(df) <- gsub("\\.", " ", names(df))
-
-1
votes4
answers264
viewsQ: R - How to replace "." (dot) with " (space) in the column names of a Data.Table?
I have an extended date.table with 64 columns. The names of the columns are separated by points and I would like to separate by space. Example: Current: "Salary.January", "Salary.December",…
-
0
votes1
answer221
viewsQ: Postgresql - Importing . CSV into an existing table
I have a table with three columns, which already has data, in my Postgresql. I have a file . CSV with four columns. I would like to add the data of three columns of . CSV to SQL without replacing…
-
3
votes1
answer258
views -
2
votes1
answer258
views -
0
votes2
answers251
viewsA: R - brazilmaps (border of states)
I solved the problem as follows: library(geobr) # Definindo bordas de SP e MG mapa_SP <- read_state(code_state="SP", year=2018) mapa_MG <- read_state(code_state="MG", year=2018) After that, I…
-
1
votes2
answers251
viewsQ: R - brazilmaps (border of states)
I created a map of SP and MG states using brazilmaps(). On this map I filled some cities with values. However, I would like to make the border of states appear on Plot. How do I do that? Follow what…
-
0
votes0
answers133
viewsQ: R - How to convert all columns of a data.table encoding?
Hello ! I’ve been through the documentation data.table() , but I still can’t fully understand. How would this function, for a dt ? for(i in 1:ncol(df1)) { df1[,i] <- df1[,i] %>% iconv(from =…
-
2
votes2
answers92
viewsQ: A - How to display repeat progress ? And processing time?
Hello ! I am importing a database by Chunks and making filters. I use this code that I took from someone here and adapted to my case: arq_grande <- file("cnpj_dados_cadastrais_pj.csv", "r")…
-
1
votes1
answer185
viewsQ: How to import a large . txt file with data.frames and columns?
Hello, all right ? Precise import a large db that is in .txt and divided into 20 parts of 5Gb each (approximately). Within that base there are three data.frame, with 3 different column quantities.…