Posts by mbranbilla • 314 points
7 posts
-
0
votes2
answers1214
viewsA: Insert vector value of a data.frame into another data.frame
You can use the function subsetto verify which value of the variable parc you need to use: subset(coordg, parcela %in% dados$parc) this will return the required field value parcela dataframe coordg…
ranswered mbranbilla 314 -
3
votes3
answers144
viewsA: Help with select
You can use Case When by selecting it and removing it from the 'Where', as below: select f.no_equipe, h.no_pessoa_fisica, case when a.nu_cns_cidadao = b.nu_cartao_sus then a.nu_cns_cidadao else 'SEM…
-
0
votes2
answers1053
viewsA: read.table, data.frame
This usually occurs when the data you are reading has a line with fewer elements than the others. For example, if you have several rows, all with 29 elements (like columns of a table), and one of…
ranswered mbranbilla 314 -
4
votes1
answer1375
viewsA: Import Excel Tables into R
I found a way to do the reading with the package XLConnect. require(XLConnect) dados <- readWorksheetFromFile("Pasta1.xlsm", sheet=1) Here it worked for a very simple set of data saved in xlsm.…
ranswered mbranbilla 314 -
1
votes1
answer847
viewsA: VBA Rename all files starting with "Rel"
Maybe the code below will help you. Basically, loop the files in a directory and replace, in the name of each file, the string you want to replace with the new. Follow the code with the edition…
vbaanswered mbranbilla 314 -
3
votes1
answer1224
viewsA: Add line to line in a date.table in R
I was able to optimize the execution MUCH using matrices instead of data table. (there was nothing in my program that justified the need for a date.table). Follow the code with solution I found: #…
ranswered mbranbilla 314 -
8
votes1
answer1224
viewsQ: Add line to line in a date.table in R
Is there any method that can be added row by row in a date.table in R without using a'for', so that the value of the next row in a column is the value of the previous row added with a value…
rasked mbranbilla 314