Posts by Fernando • 357 points
11 posts
-
1
votes1
answer106
viewsQ: How can I build a table result using "eventReactive" in Shiny
How can I create a "table result" for each relationship I chose in selectInput "Col" and "Row"? Dinamicaly, for every time you press the 'ok' button'. library(shiny) shinyUI(fluidPage( h4("Give a…
-
2
votes1
answer158
viewsQ: How to Insert selectInput across the datatable
I’m using the Shiny. How can I display a selectInput, with options from 1 to 5, in all cells of a DT::datatable? All I’m getting is the tag div, through the vlr[i] within the for. library(shiny)…
-
4
votes1
answer89
viewsQ: Select data from df according to data from a list
Dear(as) as given below: nr <- c(100:199) dt <- rep("data",100) x <- data.frame(nr,dt) y <- c(110:115) I need to get,the common numbers between the first column of the date.frame x and…
-
0
votes1
answer31
viewsA: recover rows from a data frame
result <- df[df[1]==(lapply(df[1], Function(x) Intersect(ids,x))),]
-
0
votes1
answer31
viewsQ: recover rows from a data frame
I need to recover the entire line of the DF, in a new DF, only when I find the vector element, in the id field of the DF ids <- c(2001586,2007037,2012677,2020645) df <- t(data.frame(colnames =…
-
0
votes2
answers1348
viewsQ: Compare vector elements in R of different sizes
My intention here is to find the elements in common between a and b. a <- seq(from=1, to=5, by=1) b <- seq(from=5, to=13, by=1) x <- which(a==b) Warning message: In a == b : longer object…
-
3
votes1
answer84
viewsQ: Similarity of elements in different vectors
I have two vectors: A <- c("RS", "DF", "CE") B <- c("Porto Alegre - RS", "Brasília - DF", "Fortaleza - CE", "Porto Alegre - RS", "Acre - AC", "Recife - PE") and a function: f <-…
-
5
votes1
answer2161
viewsQ: Concatenate two columns of an array into a string of characters
Suppose I have the following vectors: n <- c(1:5) c <- c("A","B","C","D","E") I build the following matrix with them: m <- matrix(c(n,c), ncol = 2) What is the best way to obtain such a…
-
2
votes1
answer212
viewsQ: Strsplit regular expression
How to assign E.R. to separate the city name ? cid <- c(cidade1..SP.Brasil,cidade2...SP.Brasil,cidade3..SPDF.Brasil,cidade4...SPDF.Brasil) In the sublime for example, this works:…
-
3
votes1
answer77
viewsQ: R - match and add string
n <- c("alberto queiroz souza","bernardo josé silva","josé césar pereira","alberto, q-s.","alberto, queiroz souza","alberto, q. s.","alberto, q c", "bernardo, j. s.", "bernardo, j. silva", "josé,…
-
3
votes2
answers64
viewsQ: R - match and replace string
I have this vector: n <- c("alberto queiroz souza (alberto, q-s.)", "alberto queiroz souza (alberto, queiroz souza)", "alberto queiroz souza (alberto, q. s.)", "alberto queiroz souza (alberto, q…