Questions tagged [plyr]

plyr is an R package with tools to solve a variety of problems using the split-apply-combine strategy

Filter by
Sorted by
Tagged with
0 votes
0 answers
58 views

How to add quality to hls player (plyr.io) along with other controls(rewind, fast-forward,current-time)?

I am trying to create html/php player (see this below html code) <html> <head> <link rel="stylesheet" href="https://cdn.plyr.io/3.5.6/plyr.css" /> <script src=&...
0 votes
0 answers
35 views

I want to remove all information from the embedded youtube video using Reactjs

The title of the videos Copy Link Share Watch on YouTube Suggested videos Name of the channel Can I do that? There are two packages that I am trying out, plyr and videojs. However, neither of these ...
0 votes
2 answers
45 views

adding a data to new column if seperated by "+" sign using R

Following previous question,enter link description here I have extra informations with my data,I included the gene with the data. Since same gene were predicted as different enzyme, results were ...
  • 91
0 votes
1 answer
20 views

Finding mean, standard deviation, and standard error of the levels of a variable across multiple subjects in R

I'm trying to find mean, sd, and se for nine different conditions across 32 subjects so that I can create a plot. Every subject has a frequency value associated with each level of condition. This is ...
0 votes
0 answers
43 views

Having a trouble to separate the names in a data frame

I am having trouble separating the names in a data frame. Can anyone help me with that? Here is the data frame code. Classe1 <- c("class1", "class2", "class3","...
0 votes
0 answers
45 views

Video autoplay muted with plyr.io doesn´t play

any idea how to autoplay a plyr instance? I know that chrome is blocking audio by default, that´s fine for me :) Just want to have it autoplay and muted, so the user should be able to unmute the sound ...
7 votes
4 answers
124 views

Padding or filling a dataframe in R if I know the range

I'm looking for something similar to bedtools subtract but with dataframes. For example, say I have the range as a dataframe here: Start End Value 0 100 P And I have another dataframe, which is ...
0 votes
1 answer
26 views

How can I add a condition in a function using ddply

I am creating a new variable mydata_weighted.equity for my dataset using the following code: mydata_weighted.equity <- ddply(mydata, .(TrackerID), function(x) data.frame(weighted.equity = ...
  • 17
0 votes
0 answers
96 views

Error in R: non-numeric argument to binary operator

I would like some help with understanding and fixing an error message that I encountered when I executed the command View(combined_data). The error message that appeared was: r error 4 (Error in ...
0 votes
0 answers
23 views

Filter Rows Based on String AC27 and AC28

im_id sub_status status_date Flag_Status 12345 PD01 01-FEB-2023 12345 PD02 02-FEB-2023 12345 PD81 02-FEB-2023 12345 PD63 02-FEB-2023 12345 AC27 02-FEB-2023 12345 AC27 03-FEB-2023 Cancel Not ...
0 votes
0 answers
13 views

How to change the digits format on Plyr player

I am using Plyr for audio and video media, I want to use arabic/indian digits instead of english I tried passing an i18n object but it doesn't have digits as keys
0 votes
1 answer
29 views

Draw rows based on probabilities in R

I have two datasets. I want to assign for every row of second dataset a "Group" from first dataset based on "Probabilities" from first dataset. Logic what I want to do is as ...
  • 81
0 votes
1 answer
30 views

create dataframe of r2, residuals, and coeff from linear models

Exactly like this question but how do you also get the R squared value for each model? link Sample data test <- data.frame(row=c(1:16), plot = c(1,1,1,1,1,2,2,2,3,3,3,3,3,3,3,3), ...
  • 11
3 votes
3 answers
53 views

Calculate pairwise variable-differences in a data.frame/tibble

I have the following dataframe consisting of different variables (A, X, L) that were measured at two different times (t1 and t2). Of course, in the real data there are many more variables (just for ...
  • 1,523
0 votes
0 answers
15 views

How can I update the mp3 file in vue plyr component

how can i force a reload of the componente when i change the language on the page in a floater. I tried to use :key="store.state.language", but with each language change, the old language ...
1 vote
0 answers
36 views

Adding custom setting in plyr

I'd like to add a custom option to the settings that will set a variable value For the sake of the argument, let's say it's theme, with the options: light, dark and blue It will open up the regular ...
  • 13k
1 vote
2 answers
24 views

How to cbind a list of tables by one column, and suffix headings with the list item name

I've got a list of dataframes. I'd like to cbind them by the index column, sample_id. Each table has the same column headings, so I can't just cbind them otherwise I won't know which list item the ...
  • 887
0 votes
1 answer
63 views

r nested table with row percents

I am trying to create a nested table in R with Row Percents. This is my dataset: data("mtcars") head(mtcars) I am trying to create a summary table like this: vs = 0 ...
0 votes
0 answers
28 views

how to make suitable lighting around the video player?

I want to make the background of my website match the colors of the player like in YouTube but i don't know how. Does anyone have any ideas? Screenshot from YouTube This is what my player page looks ...
  • 1
2 votes
3 answers
42 views

How to reshape long format data and count the values

I think this is a basic question, but it seems to be frustrating me... I am using R and have data in long format; a data.frame with each value a string. I want to produce a summary table of the counts ...
0 votes
0 answers
53 views

How to unzip file with different pattern name like alphanumeric folder name that changes everyday

I have plenty of zip files and I want to load only the ones that met the name condition for example, unzip any file that has a name like this "Query Transaction History_20221122" I was able ...
0 votes
1 answer
27 views

Adding a function to count the number of cases in R

I need to calculate SD, mean, and the number of each category for subclasses defined by two variables. I found the following code from a webpage(http://www.sthda.com/english/wiki/ggplot2-error-bars-...
2 votes
1 answer
26 views

R - Add each vector element into a variable of a dataframe recursively

I have a list of people... v <- c("John", "Paul", "Annie") and I want to distribute them recursively accross 14 different rooms. df1 <- data.frame(ROOM = c("...
0 votes
2 answers
30 views

replacing multiple values seperated by a comma by other values

here are a few rows of my data : dput result : structure(list(A= c("2", "1, 2", "2", "2"), B= c("2", "none", "1", "1&...
  • 21
0 votes
0 answers
24 views

Error with custom plyr function for aggregating "Mindware" files

Apologies for not having a reproducible example- this involves multiple individual files and I'm not sure how to create an example for this issue. I'm using a function to aggregate a large set of ...
0 votes
0 answers
85 views

plyr.io video auto pause after increase volume

I use plyr.io In my system I generate an iframe for the user to deploy on his site, inside this iframe is called a video with plyr.io player, this youtube video, which automatically also generates an ...
0 votes
1 answer
52 views

Faster way to map values than plyr::mapvalues() in R?

I am mapping several columns of data and would like to make it faster. Here is what I am currently doing: datatable$col1 = mapvalues(datatable$col1, from=datatable[value==1, col5], to=datatable[value==...
  • 403
0 votes
1 answer
30 views

Tidy up rbind(ddply()) R for transforming from wide to long

So I have figured out a solution on how I can transform my data from wide to long. The dataset had 190 columns representing 19 variables for 10 years (and additionally 31 columns that did not require ...
0 votes
1 answer
45 views

transforming complex wide data to long in R, multiple year columns, corresponding values, UTF-8 issues (Duplicate?)

What I have is a wide format, that need to get reshaped and sorted differently. I have 10 columns in total for year, one same year for all rows, different year per column. These I would like to merge ...
1 vote
1 answer
52 views

dplyr fill missing time series values with NA and by group

I have a data frame like so: library(tidyverse) #make some data df <- tibble(ID = c(1, 1, 2, 2), Year = c(2000, 2003, 2000, 2003), Value = c(1, 1, 1, 1)) ID Year ...
0 votes
1 answer
59 views

plyr::join_all: Join columns in several objets doesn't work

I have this problem: # Packages library(tidyverse) # Open band file bands_F <- read.csv("https://raw.githubusercontent.com/Leprechault/trash/main/bands.csv") str(bands_F) # 'data.frame': ...
  • 1,503
1 vote
2 answers
46 views

Counting unique combinations of values in 1 column and 2 additional columns without duplicates

I have a large df of genomic data for many different tumor samples. One column "mutation" reports the specific variant of a protein detected in the sample. Two additional columns "...
0 votes
1 answer
429 views

How to add an overlay text over video (using Plyr.io) video player on full screen mode?

I am using the Plyr.io video player which is an open source video player this is its link: The link for plyr.io, and I am using the HTML 5 video player. However, I have implemented it using the ...
0 votes
2 answers
271 views

iFrame height cannot be controlled , after using plyr and boostrap

As you can see the iframe height changes according to the video, I want the iframe video height to stay the same as I am making a website that allows people to watch youtube videos through the iframe ...
  • 121
0 votes
0 answers
42 views

Can't play ads plyr.io (imasdk) in nuxtjs

Everything working fine when I'm using a normal file like index.html with plyr but when I try using it in Nuxt I get this error Uncaught SecurityError: Blocked a frame with origin "http://...
0 votes
1 answer
107 views

Can I append a header row of data with a different number of columns in R?

EmployerID | 1.0 | 20220801 Dairy | Milk | 1.99 | Mary | 2x Produce | Tomato | 1.49 | John | 1x Produce | Orange | 0.99 | Nilofar | 3x I'm working with a pipe-...
0 votes
2 answers
34 views

R code for creating dataframes including unused categories?

I am trying to make all my data frames in r have the same levels in a categorical column so that, when I make barplots of them all, they are comparable with some having "unused factors" of ...
1 vote
1 answer
100 views

aggregate function in R, sum of NAs are 0

I saw a list of questions asked in stack overflow, regarding the following, but never got a satisfactory answer. I will follow up on the following question Blend of na.omit and na.pass using aggregate?...
  • 13
0 votes
2 answers
100 views

Is there a way to force mutate in R to use single values rather than whole column values?

For example, I have tried: df <- tibble(x = c(1,0,0,1), y = c(1,1,0,0), z = c(0,1,1,0)) df <- df %>% mutate(pos_seq = c(x,y,z)) #or df <- df %>% rowwise() %>% mutate(pos_seq = c(x,y,...
  • 1
0 votes
3 answers
49 views

How to collapse redundant rows together to get rid of mirrored NAs in two columns?

I'm modifying this toy df from this question, which is similar to mine but different enough that its answer has left me slightly confused. df <- data.frame(id1 = c("a" , "NA", &...
0 votes
3 answers
74 views

How to remove the prefix of each sample

I was stuck in removing the prefix of each sample. I have tried to remove all the number within the sample, but this could not be a good way for grouping. I would like to only keep the sample name as ...
0 votes
1 answer
59 views

Creating a "Dictionary/Reference" Table

I have this dataset: col_1 = as.factor(c("a", "a", "b", "c", "b", "a")) col_2 = c(15, 346, 3564, 99, 10, 2) col_3 = as.factor(c("bb&...
  • 5,093
0 votes
0 answers
40 views

How to avoid duplication when gathering (twice) from wide to long format in R?

In dataset df I want to calculate the variance between samples as shown in this examples ###Only caclating in wide format set.seed(111) df <- data.frame(month = rep(c("A","B",&...
  • 2,343
1 vote
3 answers
90 views

How to filter nested data

How can I filter a nested dataset (make sure the nest is the exact same as some reference vector or tibble)? library(tidyverse) rev_vec <- c("apple", "pear", "banana"...
  • 828
0 votes
0 answers
16 views

Error message when using dplyr:do() as alternative to plyr:ddply

I am currently trying to fix overlapping labels in a stacked geom_bar, and the whole issue sent me off to a "side quest" so to say. I am trying a solution where the ypos is calculated for ...
0 votes
0 answers
36 views

ddply error "'names' attribute [11] must be the same length as the vector [7]"

I've been browsing for a while now, looking for an answer, and in all honestly I’m quite new in learning R so you can imagine it's been a challenge. I've seen others having the same error, but the ...
  • 1
1 vote
0 answers
1k views

Cors issue with hls.js while passing authorization header

I have digital ocean spaces setup with laravel & I am fetching an m3u8 playlist from a standalone vue app like below - const audio = document.querySelector("#player"); ...
1 vote
1 answer
44 views

operating numcolwise on a specified columns

I am working with a large cross country panel data. Here is a sample of my data: df <- structure(list(country = c("Argentina", "Argentina", "Argentina", "...
1 vote
4 answers
364 views

Using a key to replace values across a whole data.table

I have a large data table which looks as follows: V1 V2 V3 V4 V5 V6 V7 V8 V9 1: XS0285400197 TR.IssuerRating F1 F1 F1 F1 F1 F1 F1 2: XS0041971275 TR....
  • 513
1 vote
1 answer
19 views

r `dlply` error handling when model fails

I am executing multiple models by subgroups using dlply library(dplyr) library(geepack) data("mtcars") mtcars <- mtcars[,c("mpg", "cyl", "hp")] models = ...

1
2 3 4 5
50