Coder Social home page Coder Social logo

frequencies_bigaplugin.ahk's Introduction

.frequencies

adds the method frequencies to biga.ahk

Installation

In a terminal or command line navigated to your project folder:

npm install frequencies_bigaplugin.ahk

In your code export.ahk needs to be included after biga.ahk:

#Include %A_ScriptDir%\node_modules
#Include biga.ahk\export.ahk
#Include frequencies_bigaplugin.ahk\export.ahk

A := new biga()
A.frequencies([1, 1, 3, 3, 4, 4, 5, 5, 8, 8])
; => {1: 2, 3: 2, 4: 2, 5: 2, 8: 2}

Plugin Methods

.frequencies

takes an array and returns a mapping object whose keys are the values of the array’s elements and values are counts of that key appeared in that array.

Arguments

array (Array): The array to count frequencies from.

Returns

(Object): A mapping object of the ammount of times each value appeared in the array.

Example
A.frequencies(["Fred", "Barney", "Fred", "Pepples", "Barney"])
; => {"Barney": 2, "Fred": 2, "Pepples": 1}

frequencies_bigaplugin.ahk's People

Contributors

chunjee avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.