frequency

Frequency of occurrence of two-pair combinations in text data in R

妖精的绣舞 提交于 2019-12-13 03:58:40
问题 I have a file with several string (text) variables where each respondent has written a sentence or two for each variable. I want to be able to find the frequency of each combination of words (i.e. how often "capability" occurs with "performance"). My code so far goes: #Setting up the data file data.text <- scan("C:/temp/tester.csv", what="char", sep="\n") #Change everything to lower text data.text <- tolower(data.text) #Split the strings into separate words data.words.list <- strsplit(data

Frequency of a value across multiple variables?

谁都会走 提交于 2019-12-12 23:35:21
问题 I have a data set of patient information where I want to count how many patients (observations) have a given diagnostic code. I have 9 possible variables where it can be, in diag1, diag2... diag9. The code is V271. I cannot figure out how to do this with the "WHERE" clause or proc freq. Any help would be appreciated!! 回答1: Your basic strategy to this is to create a dataset that is not patient level, but one observation is one patient-diagnostic code (so up to 9 observations per patient).

Find frequencies over 3rd quartile in table

帅比萌擦擦* 提交于 2019-12-12 12:33:44
问题 I have a big data frame (+239k observations on 57 variables) with some sickness descriptions and medicines administered to those sicknesses for people in different age ranges. I'd like to find those medicines in the top quartile of frequency use for each sickness description. To make a reproducible example, I created a 1000 observations data frame: set.seed(1);sk<-as.factor(sample(c("sick A","sick B","sick C","sick D"),1000,replace=T));md<-as.factor(sample(c("med 1","med 2","med 3","med 4",

Why do we use only the first buffer in aurioTouch project

放肆的年华 提交于 2019-12-12 09:49:56
问题 I'm investigating aurioTouch2 sample code. And I noticed, that when we analize audio data, we use only the first buffer of this data, and never other buffers. in void FFTBufferManager::GrabAudioData(AudioBufferList *inBL) function: UInt32 bytesToCopy = min(inBL->mBuffers[0].mDataByteSize, mAudioBufferSize - mAudioBufferCurrentIndex * sizeof(Float32)); memcpy(mAudioBuffer+mAudioBufferCurrentIndex, inBL->mBuffers[0].mData, bytesToCopy); in function static OSStatus PerformThru( void *inRefCon,

Frequency & amplitue

孤人 提交于 2019-12-12 07:03:02
问题 I have a sql table which contains 2 columns: How to calculate the frequency of the highest amplitude wave ? (Each wave is of fixed frequency). Thank you 回答1: Try this select 1/Time as frequency from <table> order by amplitude desc limit 1 来源: https://stackoverflow.com/questions/32948673/frequency-amplitue

[portaudio]Transmit and Detect frequency - Windows

我的未来我决定 提交于 2019-12-12 06:36:50
问题 I'm new to portaudio and i looked at "How to extract frequency..." question but still i would like to have some help. i need to transmit a frequency (using the speakers) and then i would like to check if this frequency was transmitted (catching it in the microphone), of course that i would like to use portaudio for the sending and detecting. also,i have no idea how to use the fft for detection because i saw the record example and they use a SAMPLE data type and with this data type they can

Table of categorical variables by a grouping variable in R

两盒软妹~` 提交于 2019-12-12 05:50:03
问题 I have a dataset with some categorical variables + a "cluster" variable. For example: time <- c("Morning", "Evening" ,"Morning", "Morning", "Afternoon", "Evening", "Afternoon") dollar <- c("1-5", "6-10", "11-15", "1-5", "1-5", "6-10", "6-10") with_kids <- c("no", "yes", "yes", "no", "no", "yes", "yes") cluster <- c(1,1,2,3,2,2,3) data <- cbind(time, dollar, with_kids, cluster) How can I create a frequency table of all the categorical variables by "cluster"? Desired output is the table on the

r element frequency and column name

放肆的年华 提交于 2019-12-12 04:56:05
问题 I have a dataframe that has four columns A, B, C and D: A B C D a a b c b c x e c d y a d z e f I would like to get the frequency of all elements and lists of columns they appear, ordered by the frequency ranking. The output would be something like this: Ranking frequency column a 1 3 A, B, D c 1 3 A, B, D b 2 2 A, C d 2 2 A, B e 2 2 A, D f ..... I would appreciate any help. Thank you! 回答1: Something like this maybe: Data df <- read.table(header=T, text='A B C D a a b c b c x e c d y a d NA

How to create a frequency matrix?

∥☆過路亽.° 提交于 2019-12-12 04:22:46
问题 I just started using Python and I just came across the following problem: Imagine I have the following list of lists: list = [["Word1","Word2","Word2","Word4566"],["Word2", "Word3", "Word4"], ...] The result (matrix) i want to get should look like this: The Displayed Columns and Rows are all appearing words (no matter which list). The thing that I want is a programm that counts the appearence of words in each list (by list). The picture is the result after the first list. Is there an easy way

Expanding a Frequency Table Where the Variable Names are the Values

家住魔仙堡 提交于 2019-12-12 02:45:04
问题 I am working with a dataframe where each observation is linked to a specific ID, and I have a set of variables that define the "values" as if I had a factor variable. However, the value in the "cell" is the frequency. Here is a simplified version: ID 1 2 3 A 2 3 2 B 1 4 1 I would like to get two vectors that expand the frequencies so that I can calculate an interpolated median for each ID. That is, I'd like something of the form: A B 1 1 1 2 2 2 2 2 2 2 3 3 3 The psych package has a function