Questions tagged [frequency]

The rate at which a thing occurs or is found.

The rate at which a thing occurs or is found.

2858 questions
8
votes
1 answer

linux perf record: difference between count (-c) and frequency (-F) options

I'm trying to understand what the -c and -F options of perf record really do but I cannot explain what I'm seeing. I'm running these commands: perf record -a -F sleep 1 and perf record -a -c sleep 1 trying different values of…
S. Rinco
  • 123
  • 1
  • 7
8
votes
4 answers

How to count the frequency of a string for each row in R

I have a .txt file that looks something like this: rs1 NC AB NC rs2 AB NC AA rs3 NC NC NC ... For each row, I would like to count the frequencies of "NC", so that my output will be something like below: rs1 2 rs2 1 rs3 3 ... Can…
Renee
  • 113
  • 1
  • 5
8
votes
2 answers

elasticsearch disable term frequency scoring

I want to change the scoring system in elasticsearch to get rid of counting multiple appearances of a term. For example, I want: "texas texas texas" and "texas" to come out as the same score. I had found this mapping that elasticsearch said would…
Chadvador
  • 167
  • 2
  • 9
8
votes
2 answers

Using table() to create 3 variable frequency table in R

I'm new to R and seeking some help. I understand the following problem is fairly simple and have looked for similar questions. None give quite the answer I'm looking for - any help would be appreciated. The problem: Producing a frequency table…
Alison Bennett
  • 285
  • 1
  • 8
  • 20
8
votes
2 answers

Arduino - How to create two or more tones simultaneously on a piezo buzzer?

My high school electronics class decided to buy some arduino uno kits, which I must say are extremely cool. Enough about that, right now in the class we're experimenting with the piezo buzzer (it looks like this). We learned about creating songs…
Vishwa Iyer
  • 841
  • 5
  • 14
  • 33
8
votes
2 answers

Getting frequency of sound on iPhone

I'm looking for an Objective-C class that allows me to get the frequency of a live input sound on the iPhone. Didn't find anything useful. Before you ask: the frequency will not change for 0.1 seconds. Thanks for answers, Christian
cschwarz
  • 1,195
  • 11
  • 24
8
votes
2 answers

Counting unique pairs of categorical variables in R

If I have this data: One <- c(rep("X",4),rep("Y",3),rep("Z",2)) Two <- c(rep("A",2),rep("B",6),rep("C",1)) df <- data.frame(One,Two) One Two 1 X A 2 X A 3 X B 4 X B 5 Y B 6 Y B 7 Y B 8 Z B 9 Z C I want to…
theamateurdataanalyst
  • 2,794
  • 4
  • 38
  • 72
8
votes
3 answers

Creating a table with individual trials from a frequency table in R (inverse of table function)

I have a frequency table of data in a data.frame in R listing factor levels and counts of successes and failures. I would like to turn it from frequency table into a list of events - i.e. the opposite of the "table" command. Specifically, I would…
dan mackinlay
  • 945
  • 1
  • 9
  • 14
8
votes
1 answer

Efficient algorithm to find most common phrases in a large volume of text

I am thinking about writing a program to collect for me the most common phrases in a large volume of the text. Had the problem been reduced to just finding words than that would be as simple as storing each new word in a hashmap and then increasing…
TheOne
  • 10,819
  • 20
  • 81
  • 119
8
votes
7 answers

Sort the array in decreasing order of frequency of occurrence of elements in C

Question is to sort the array according to the frequency of the elements. For example, if the input array is { 2, 3, 2, 4, 5, 12, 2, 3, 3, 3, 12 } then modify the array to: { 3, 3, 3, 3, 2, 2, 2, 12, 12, 4, 5 } I wrote the code for this and…
Nit kt
  • 95
  • 2
  • 3
  • 8
8
votes
4 answers

How can I implement the piano key frequency function in C#?

How can I implement the following function in C#?
Alon Gubkin
  • 56,458
  • 54
  • 195
  • 288
8
votes
2 answers

Frequency counts in R

This may seem like a very basic R question, but I'd appreciate an answer. I have a data frame in the form of: col1 col2 a g a h a g b i b g b h c i I want to transform it into counts, so the outcome would be like this. I've tried…
aa762
  • 89
  • 1
  • 1
  • 3
8
votes
2 answers

Get frequency wav audio using FFT and Complex class

It's been asked a lot, but I still stuck about implement FFT class on Android I need to process my audio data using FFT... I already read the almost same question here How can I get frequency data from PCM using FFT and here How to get frequency…
raisa_
  • 594
  • 2
  • 10
  • 28
8
votes
4 answers

Add column to dataframe that shows frequency of a variable

Say I have a dataframe like this: location species 1 seattle A 2 buffalo C 3 seattle D 4 newark J 5 boston Q I would like to append a column to this frame that shows the number of times a location appears in the data set, with…
thesnorlax
  • 91
  • 1
  • 1
  • 5
8
votes
6 answers

How to detect sound frequency / pitch on an iPhone?

I'm trying to find a way to detect sound frequency being recorded by iPhone's Microphone. I'd like to detect whether the sound frequency is going up or down.
Piotr Usewicz
  • 620
  • 2
  • 6
  • 13