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
-1
votes
2 answers
Merge and fill different length data in R
I'm using R and need merge data with different lenghts
Following this dataset
> means2012
# A tibble: 232 x 2
exporter eci
1 ABW 0.235
2 AFG -0.850
3 AGO -1.40
4 AIA 1.34
5 ALB -0.480
6…

Adilson V Casula
- 164
- 1
- 16
-1
votes
1 answer
Function of strings to tibble
I need to define a function f(x,y) such that:
x = "col1,1,2,3,4"
y = "col2,a,b,c,d"
becomes:
# A tibble: 4 x 2
col1 col2
1 1 a
2 2 b
3 3 c
4 4 d
Any thoughts? Thanks.

skatofia
- 17
- 4
-1
votes
1 answer
Merging tibbles with left_join - increase of cases?
I have a very basic question, but I dont really know how this can happen:
I have two tibbles/data.frames called "data1" and "data2". Now, I would like to keep "data1" and add all values in "data2" where the columns "variable1" and "variable2" (which…

D. Studer
- 1,711
- 1
- 16
- 35
-1
votes
1 answer
Show objects without tibble information (R)
I have the following problem.
When I was looking up a specific value it usually looked like this:
df1[383,54]
[1] "This is a Test-String."
But when I load something from excel:
library(readxl)
df2 <- read_excel("~/Test.xls", col_names = FALSE)
It…

xyz
- 134
- 1
- 12
-2
votes
1 answer
Conflicts or errors in the tune and tidymodels packages using information gain from the colino package or recipeselectors
This code was working until yesterday, when I uninstalled the recipeselectors and colino packages. I've looked everywhere and no one has reported a similar error.
Link to download the database…
-2
votes
2 answers
Replace last 0 element in a column and replace it
I have a tibble where all values are either 0, 1 or -1. I need to locate the last 0 element in each column and replace it with 2. I am trying not to use loop here…
Help!

m45ha
- 399
- 1
- 9
-2
votes
1 answer
tibble to dataframe different lengths
I am working with a dataset, which I firstly converted from long to wide, because I need the rows (variables) to be columns:
I used:
library(tidyr)
cfa_model<-pivot_wider(cfa_data, names_from= variable, values_from = value)
and got:
I need this…

Infinito Mágico
- 19
- 4
-2
votes
2 answers
Plotting rows of a Tibble
I am new to R so please forgive me. I have a tibble called ycd with columns that I want to plot against time. I have a column in the tibble that has corresponding dates. Some columns have NA's up to a certain date because data is not available. I…

AaronSzcz
- 145
- 1
- 8
-2
votes
2 answers
Problem with mutate keyword and functions in R
I got a problem with the use of MUTATE, please check the next code block.
output1 <- mytibble %>%
mutate(newfield = FND(mytibble$ndoc))
output1
Where FND function is a FILTER applied to a large file (5GB):
FND <- function(n){
result <-…

YakovSingh
- 3
- 2
-2
votes
1 answer
How do I iterate over a nested list, where nodes may be missing
I am constructing a data frame from a (very deeply nested) json source.
I have successfully mapped the list elements I want to extract, and can almost! construct the tibble I want.
Except that some of the list elements are missing, if there is no…

Martin Andersen
- 1
- 2
-2
votes
1 answer
How to make a histogram from tibble df 3x2?
I need help making an histogram from a 3x2 tibble. I averaged the 3 samples in each group (Expt and Ctrl) and now trying to plot their histograms in the same plot. Also, I would like to add a legend that contains the coloring and name of each group.…
-2
votes
1 answer
How to add vector to tibble as a variable (column)
I have vector vec<-1,2,3. I have tibble that looks like:
first | second
1 |1
1 |1
1 |1
Now I need to add vector vec to my existing tibble as variable (column) so that tibble should look like:
first | second | third
1 |1 …

vasili111
- 6,032
- 10
- 50
- 80
-2
votes
1 answer
Is it possible reorder columns of an R tibble by some rule?
I know I can use dplyr::select to rearrange columns, but, concretely, if I have a sequence of numeric columns/variables, is there a way to tell select or another function to rearrange these variables from that having maximum variance to that having…

iago
- 2,990
- 4
- 21
- 27
-2
votes
1 answer
Where are key columns in R tibbles documented?
I am new to R. I discovered data frames, rownames() and colnames() and liked using them to index into arrays as I find it makes my code more readable as in mtcars["Mazda RX4","mpg"]
Now I learn that data.frames and hence rownames() are deprecated in…

user3135871
- 29
- 2
-2
votes
1 answer
Get data frame into right format from web-scraping work
I have code which I use to web scrape past air atmosphere data repeatedly by wrapping the httr in the function.The original code works well on looping task. You may find the original code here https://stackoverflow.com/a/52545775/7356308. I modified…

Siti Sal
- 119
- 2
- 12