tibble could refer to an R class (tbl_df class), which is an improved data frame with stricter checking and better formatting. tibble could also refer to an R package providing functions to create and manipulate a tibble.
Questions tagged [tibble]
1309 questions
0
votes
1 answer
How to filter for timestamps in between two vectors
I'm a newbie at R and am trying to filter a dataset for rain events plus 2 hours after the rain. I tried and failed to write a function to filter for that, but isn't there an easy way to do it with filter() or something similar?
So far, I have used…

KodakAsis
- 57
- 7
0
votes
2 answers
How to do a function call with a list of arguments (tibbles)
I am trying to call a function, using a list containing two tibbles as arguments.
I've tried multiple ways (pmap, do.call, invoke, exec) but none seem to work. It seems that instead of using the two tibbles, the lists of the tibbles are…

Christian Ka
- 40
- 5
0
votes
0 answers
Tibble object (in R) not recognizing numeric variables
Tibble seems to be messing up the variable type whenever I call it a certain way. Here's a working example:
a = rep(LETTERS[1:10], times=5)
b = 1:10
d = data.frame(a,b)
d = d%>%group_by(a)%>%summarize(total=sum(b))
mean(d[,"total"])
Strangely, it…

dfife
- 348
- 1
- 12
0
votes
0 answers
assertr: Automatically verify assumptions on columns
I want to automatically verify assumptions on columns of my tibble using assertr. The problem is that I have hundreds of columns so I can't apply them column by column. Data looks like this:
df <- tibble(
x = c(1,0,1,1,2),
y = c('A', 'B', 'C',…

mihagazvoda
- 1,057
- 13
- 23
0
votes
0 answers
Can I use a tibble in a ggscatter call?
Do I need to convert my tibble into a data frame when I call ggscatter?
My code works fine when I convert my tibble to a data frame before calling ggscatter. Is there a way to use the tibble directly in the ggscatter call without needing to convert…

Michael
- 59
- 7
0
votes
1 answer
Summarise tibble to multiple rows of output
Suppose I have the following tibble in R:
activation_date | country | campaign | revenue | users
======================================================
1 | 1 | 1 | R_1 | U_1
2 | 1 | 1 | R_2 …

Pedro Carvalho
- 565
- 1
- 6
- 26
0
votes
1 answer
grepl over tibbles vs data frames in R
I'm trying to parse some data read in from Excel worksheets and, because they are in non-standard rows, I need to use grep or which to find the index of the starting row for my data but I'm getting oddly different results depending on whether I use…

Andrew Leach
- 137
- 1
- 10
0
votes
1 answer
Match rows and columns of two dataframes/tibble and copy values
I have two dataframes/tibble.
The first one (initialized with zeros except for the first column):
> df_
# A tibble: 33 x 101
sample_id SOM1 SOM2 SOM3 SOM4 ..... SOM100
1 1 0 0 0 …

Rohit Farmer
- 319
- 4
- 15
0
votes
1 answer
sort tibble rows by descending count of NAs
Apologies if I have missed where this has been asked before - I couldn't find it. I am learning about tibbles and the verb arrange. I am wondering if there is a more efficient way to arrange rows in descending order of total row NA count then I have…

QHarr
- 83,427
- 12
- 54
- 101
0
votes
1 answer
Shift cells in a data frame to the right based on row values
I'm working with a data frame that was created from multiple tab separated text files imported as tibbles that are joined together using rbind . The files all contain similar column names but some of the values are under the wrong column when…

Israel Girón-Palacios
- 110
- 1
- 9
0
votes
0 answers
How to iterate a parameter from tibble to a function
I would like ideias to iterate rows from tibble parameter into a user function.
I create a loop for, but I would like to use some functions of Tidyverse, like purrr or dplyr.
The data set with Keys of API is like this:
keys.bots <- tibble(bot =…

Rafael Lima
- 420
- 1
- 5
- 16
0
votes
2 answers
How to separate two values of same variable under same name?
I have a dataframe like this:
library(tidyverse)
a <- tibble(x=c("mother","father","brother","brother"),y=c("a","b","c","d"))
b <- tibble(x=c("mother","father","brother","brother"),z=c("e","f","g","h"))
I want to join these dataframes so that each…

Renat
- 35
- 5
0
votes
1 answer
remove paired rows where lag == 0 and calculate % change using dplyr and chaining
I'm working with a very large tibble and want to calculate the % of growth of those tables over time (first entry to last entry, not max to min). I would also ultimately want to store any tables with 0 change to their own list/tibble but remove them…

Nick Bohl
- 105
- 3
- 13
0
votes
0 answers
How to delete tibble columns names of which is contained in vector?
This allows me to delete single column:
a <- c(1,2,3,NA,5)
b <- c(1,2,3,4,5)
c <- c(1,2,3,4,NA)
d <- c(1,2,3,4,5)
z<-tibble(a, b, c, d)
z
z<-select(z, -starts_with('c'))
z
(More examples here: how to drop columns by passing variable name with…

vasili111
- 6,032
- 10
- 50
- 80
0
votes
0 answers
How do I create a tibble that has a column of tibbles or data.frames?
# A tibble: 12 x 3
x y z
1 1 1 2
2 3 2 3
3 2 3 4
4 3 4 5
5 2 5 6
6 4 6 7
7 5 7 8
8 2 8 9
9 1 9 …

Bear Bile Farming is Torture
- 4,317
- 4
- 27
- 61