Questions tagged [frequency-distribution]

A frequency distribution is an arrangement of the values that one or more variables take in a sample

A frequency distribution is an arrangement of the values that one or more variables take in a sample. Each entry in the table contains the frequency or count of the occurrences of values within a particular group or interval, and in this way, the table summarizes the distribution of values in the sample.

220 questions
0
votes
0 answers

R: Sampling dataframe so that it contains the underrepresented values of another dataframe

In a research problem I have real world (RD) and artificial data (AD) for several continuous variables. Both have approximately a normal distribution (with a tail to the right) and similar ranges. I need to transform the artificial data so that it…
0
votes
1 answer

Frequency distribution is not returning words but letters

I am trying to find what words appear the most often. But each time I run FreqDist it does not return the most common words but letters. FreqDist({' ': 496, 'e': 306, 't': 205, 'a': 182, 's': 181, 'n': 160, 'o': 146, 'r': 142, 'i': 118, 'l': 110,…
Alexander
  • 27
  • 5
0
votes
1 answer

Tidy data with frequency weights in rows

I have collected non-tidy data from different studies. Assume this data is about studies that report on a number patients having treatment_x and with a treatment outcome in percentages and an x number of recurrences of the treated…
0
votes
1 answer

What SAS function can I use to count variables and perform frequency distribution in order to calculate the number of options available?

Hellow, how the number of options available should be calculated in SAS? My data: Obs Density$ P1 P2 P3 P4 1 0500_0600 0 0 0 0 2 0500_0600 0 0 0 0 3 0500_0600 0 0 0 0 4 0500_0600 0 0 0 0 5 0500_0600 …
0
votes
0 answers

How to plot a frequency table from inside a function in R?

I am trying to build a function to create a bar chart that takes the data frame and column name as the parameters. Inside the function, it will create a subset based on the parameters entered, then plot a bar chart of the resulting subset. Here is…
0
votes
0 answers

How to draw a colourmap that distincly shows the points when there is a lot of data?

I am currently plotting a graph where the x and y axes help me represent a unique point and at that point, I use a certain colour to indicate the frequency of the point. The points have a frequency from 0 to all the way until 200,000. Now having…
0
votes
0 answers

Why is when running view_df() function?

I have ~11,000 customer surveys that I want to do some exploratory data analysis on. Running the view_df() function is omitting some information in the table, so I trimmed down the dataframe to just 3 columns to…
0
votes
1 answer

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 vs=1 am =0 am-1 …
0
votes
1 answer

3-way Contingency Table R: How to get marginal sum, percentages per group

I have been trying to create a contingency table in R with percentage distribution of education for husbands (6 category) and wives (6 category) BY marriage cohort (total 4 cohorts). My ideal is something like this: IdealTable. However, what I have…
0
votes
0 answers

How to calculate a frequency table with weighted distribution

I am trying to calculate weighted portfolio allocation in R from a dataset containing information about an ETF holding. I will print the head down so data structure is apparent. Ticker `Security Name` Sector …
0
votes
3 answers

Create a frequency table and plot histogram using dplyr/ ggplot

I am new to piping and dplyr in R and need some help. Please note- I have a solution for this question using cut function. Plotting Categorical Values Histogram in R I want to solve the problem using dplyr. I want to use dplyr to create a frequency…
trailblazer_1
  • 111
  • 1
  • 7
0
votes
0 answers

R: How to make a frequency distribution for categorical (factor) variables?

(a)  Investigate the frequency distributions for the categorical predictors. I have tried the below but can’t seem to get it to work. Any ideas on how to fix this? library(mlbench) data(Soybean) str(Soybean) soy = Soybean[,-c(1,2)] >…
bandcar
  • 649
  • 4
  • 11
0
votes
1 answer

Getting Numerical Frequency Table for a Dataframe?

i would like to know, how can i do the following. My input table is as follows Sr No Data 1 John Apple Android 2 John Apple Microsoft Ryan 3 Sam Android Microsoft Ryan Paul i broke the data column into individual dataframes using the…
0
votes
1 answer

Frequency tables by ID in R

Background First: I know this looks like several other similarly-titled posts, but I promise mine's different. So I've got this table: df <- data.frame(ID = c("a","a","a","b", "c","c","c","c","d","d","d","d"), category =…
logjammin
  • 1,121
  • 6
  • 21
0
votes
1 answer

frequency distribution in R increasing my frequency

is it possible to increase the absolute frequency of my intervals, here I mean eg as in the program for level: [0,1) count(frequency ) 1 , but I want to set it count to eg 780,000. for each interval I want to increase the frequency with different…
Nganja
  • 9
  • 1