similar to: Quick data-manipulation question

Displaying 20 results from an estimated 30000 matches similar to: "Quick data-manipulation question"

2003 Sep 22
1
Data frame from list of lists
This seems to be a simple problem, and I feel that there ought to be a simple answer, but I can't seem to find it. I have a function that returns a number of values as a heterogeneous list - always the same length and same names(), but a number of different data types, including character. I want to apply it to many inputs, resulting in a list of lists. I would like to turn this list of
2017 Nov 08
4
Gapless concatenation of Opus frames
Hi! Short version of my question: How to produce Opus frames which can be safely concatenated and how to embed them into a WebM file? Long version: I'm currently implementing a web-based audio player which streams audio as opus/WebM using the HTML5 media source extensions. Currently, the server decodes a set of input files to a fixed RAW audio format (stereo, 48000 kHz) and encodes the
2003 Apr 21
3
index after rbind
I am using rbind to concatenate two dataframes, but after the rbind I get a strange "double" index. I am using rbind a number of times to make one large dataset. Is there a way to prevent the "double" index? Or is there some other way to concatenate the data (it looks like merge only works by columns)? Here is an example of the "double" index.
2010 Oct 15
2
Joining together multiple csv files
Hi, This feels like a kinda dumb basic question, but I haven't been able to figure it out. I have a bunch of csv files I'd like to put into one csv using R. I have tried cat, append, join, aggregate, and a bunch of other things, but none of them really work for combining the data. If it's one of those listed, then my syntax is goofy. The csv files have different row numbers but the
2017 Nov 13
3
Gapless concatenation of Opus frames
Hi Jean-Mark, thank you for your answer! Yes, you understood my question correctly. I was just about to compose a reply to my original question, where I described how I solved my problem. As you've already suggested, I've switched to Ogg/Opus, which is better supported, but does not work with the Media Source Extensions. I'll have a look whether disabling prediction will help with
2004 Sep 24
3
Error with repeat lines() in function
I have a function that does some plotting. I then add lines to the plot. If executed one line at a time, there is not a problem. If I execute the function, though, I get: Error in ans[[1]] : subscript out of bounds This always occurs after the second lines command, and doesn't happen with all of my data points (some do not have errors). Any ideas? Thanks, Sean
2009 Jul 23
2
alternative to rbind within a loop
Hi, I often have to do this: select a folder (directory) containing a few hundred data files in csv format (up to 1000 files, in fact) open each file, transform some character variables in date-tiime format make into a dataframe (involves getting rid of a few variables I don't need concatenate to the master dataframe that will eventually contain the data from all the files in the
2003 Apr 16
5
besoin d'aide
J'aimerais savoir si la fonction merge() est la seule disponible pour concatener des tableaux de donn?es? Est-ce normal que l'ex?cution soit lente?
2006 May 10
2
Concatenating data frame
Hello, I have searched through the R-help archive and find that the easiest way to concatenate data records in a dataframe is to use rbind() I know we can do that using rbind, but it is slow when we are doing rbind thousands of times to a growing list, each time adding one or two records to the ever growing existing data because in existingRecords<-rbind(existingRecords,
2010 Aug 18
1
syntax for batching rbind process
Dear helpeRs, I am attempting to read in a series of csv files so I can bind them into one large dataframe. I have written the following script: test <- list.files(".", pattern = "csv") #lline 1 imp <- list() #line 2 for (i in 1:length(test)) { #line 3 imp[i] <- read.csv(test[i]) #line 4 }
2004 May 28
2
Simple list manipulation question
I have a list of vectors $A "AB" "BC" "CD" $B "GF" "HG" "FH" "FJ" and I want to convert it into a dataframe of form A AB A BC A CD B GF B HG B FH B FJ Just can't quite come up with a nice "R" solution for it. Thanks, Sean
2005 Jan 20
2
Creating a custom connection to read from multiple files
Hello, is it possible to create my own connection which I could use with read.table or scan ? I would like to create a connection that would read from multiple files in sequence (like if they were concatenated), possibly with an option to skip first n lines of each file. I would like to avoid using platform specific scripts for that... (currently I invoke "/bin/cat" from R to create a
2012 Aug 23
3
Concatenating data frames in R versus SAS
I am trying to concatenate 2 datasets that don't have exactly the same column. In SAS I did: data summary; set agency prop; run; No problem in R I get error message summary <-rbind(agency,prop) Error in match.names(clabs, names(xi)) : names do not match previous names But when I use rbin.fill, that overwrites the second file w/ first one. Is there a way to replicate the sas process
2017 Nov 16
2
Gapless concatenation of Opus frames
Hi all, I finally understand how lipopusenc is capable of producing chainable Opus files (in contrast to my program), and I managed to successfully implement the method [1]. Essentially, the last frame of a file is marked as a "keyframe" by disabling prediction for this frame in libopus. This encoded keyframe frame is then copied in verbatim to the next file, with the pre-skip set to
2010 Mar 12
6
Randomly sampling subsets of dataframe variable
Fellow R users, I am stumped on what would seem to be something fairly simple. I have a dataframe that has a variable named 'WEEK' that takes the numbers 1:26 (26 week time-period) with each number repeated five times consecutively (once for each weekday, Monday through Friday). Ex. 111112222233333.....2626262626. I would like to randomly extract two weekdays per five day week for
2010 Jul 19
3
concatenating column names in a loop
Hi all, I am trying to concatenate words together to create new column names, using a loop. Please consider the following toy example: x <- matrix(nrow = 1, ncol = 3) colnames(x) <- c("a", "b", "c") x[1,1] <- "1" x[1,2] <- "2" x[1,3] <- "3" I would like to create a new matrix with column names based on the column names
2001 Jul 18
2
string manipulation in R?
Hi all, back again, [Quick version] How do I concatenate two string to produce a third? Does the underlying representation of "character" allow this? [Long version] One thing I want to do with my database is to compare each record pairwise, without loading the whole database in memory....so I what I would like to do first query to get a list of strings which are the of the database
2004 Jun 25
3
String manipulation
Hi, let's see, if someone can help my with this one: I have the string as follows: > str<-("one","two","three") Now I want to concatenate the items to one string, seperateted by space or something else, >str >"one, two, three" If possible without a loop. My actual goal ist to create string like >str.names >"female = names1, male
2017 Nov 15
2
Gapless concatenation of Opus frames
Hi Jean-Marc (and everyone else who replied), > Considering you're switching to Ogg, I think you should give libopusenc> a try. It does a really good job at getting rid of *all* discontinuities> -- to the point where you can chop a song into files less than one> millisecond each and it still sounds good. It's also pretty simple to> use. You just feed it audio and tell it
2007 Jul 03
2
vertically concatenating data frames
Hi, what is the recommended way to vertically concatenate 2 data frames with the same column names but different number of rows? My problem is something along these lines: df1 <- data.frame(var1=var1,var2=var2,var3=var3) # nrow(df1)=1000 df2 <- data.frame(var1=var4,var2=var5,var3=var6) # nrow(df2)=2000 I tried df <- c(df1,df2), no success. stack does not seem to be appropriate