Questions tagged [function]
A function (also called a procedure, method, subroutine, or routine or macro) is a portion of code intended to carry out a single, specific task. Use this tag for questions which specifically involve creating or calling functions. For help implementing a function to perform a task, use [algorithm] or a task-specific tag instead. By creating function the logic can be isolated and can be called repeatedly.
function
11
questions
0
votes
1
answer
14
views
Reclassifying a large rasterstack in Terra based on another raster
I'm trying to do the following:
I have a stack of monthly temperature rasters, and from this I calculate the 90th quantile of the stack.
Then, I want to have a count for how often each raster cell is ...
0
votes
0
answers
7
views
How to pass arguments from within a function to ggplot stat_summary function
I am trying to create a faceted box plot within a function to do an exposure-response analysis on patient data. The plot is to be faceted by category, with exposure on the y-axis and a categorical ...
-3
votes
0
answers
11
views
How to list articles from the last 3 days on a page with wordpress function code? [closed]
Please help, we need guidance how to insert / display list of articles from the last 3 days on a page with wordpress function code?
i have searched many times but still didn't find the answers ...
...
-1
votes
0
answers
26
views
Uncaught ReferenceError function not defined in Javascript [closed]
I have a HTML file that contains the following element
<div class="altitude">
<span><b>Solar Altitude</b></span>
<p>Altitude Now: ...
-1
votes
2
answers
34
views
The function sumAscii should take an array of names and calculate each name's score based on the total of each character's lowercase ASCII value
The function sumAscii should take an array of names and calculate each name's score based on the total of each character's lowercase ASCII value. It should return the name with the highest score. E.g. ...
0
votes
0
answers
11
views
Automatic counter
I´d like to make an automatic counter beside a specific condition. For example, the counter should count the sequence of victories of a team. If the result is win count 1, see another date, if another ...
-3
votes
0
answers
24
views
I can't display values from a javascript function separately through an array or a callback function [duplicate]
I need to retrieve the latitude and longitude coordinates to use them elsewhere. What is the easiest way? Using an Array? Or an callback function?
According to the code snippet below, the console.log(...
-1
votes
0
answers
37
views
Exact same line of code not working between 2 PCs [closed]
On my home PC with R4.4.0
avg_demand_per_yearday <- aggregate(demand ~ yearday, df, 'mean')
it works as expexted. On my work machine with R4.4.1 an error occurs
Error in UseMethod("aggregate&...
0
votes
0
answers
25
views
Calculations with the MS excel tool using the functions and formulas in a single cell
How do we calculate Coefficient C if R/W=0.64 and H/W=1.8? using functions in a single cell/step.
Detailed query:
If We have a table with some rows and columns, How do we calculate the respective ...
0
votes
0
answers
20
views
Prevent VS Code suggesting turning a function into a class
I have an issue with VS Code suggestion turning a function in JS into a class. It gives the following suggestion message:
This constructor function may be converted to a class declaration. ts(80002)
...
0
votes
0
answers
13
views
How do I write a function that "converts" an arrow function to a normal function? [duplicate]
For example, can I write some function (call it convert) that can convert an arrow function to a normal function? I want to bind the function to some object but I can't do that for arrow functions. ...