Your data doesn't seem to have a normal distribution.
There's a much more obvious way anyway, don't know why it didn't occur to me before Sort it, then look past the % number of lines you want for the threshold.
I have a simple gnuplot question. I have a set of points (list of x,y,z values; irregularly spaced, i.e. no grid) that I want to plot. I want the plot to look like this:
- points in map view (no 3D view)
- color of each point should depend on its z-value.
- I want to define my own color scale
-... (0 Replies)
suppose u have a file which consist of many data points separated by asterisk
Question is to extract third part in each line .
0.0002*0.003*-0.93939*0.0202*0.322*0.3332*0.2222*0.22020
0.003*0.3333*0.33322*-0.2220*0.3030*0.2222*0.3331*-0.3030
0.0393*0.3039*-0.03038*0.033*0.4033*0.30384*0.4048... (5 Replies)
Hello all,
I have a data file that needs some serious work...I have no idea how to implement the changes that are needed!
The file is a genotypic file with >64,000 columns representing genetic markers, a header line, and >1100 rows that looks like this:
ID 1 2 3 4 ... (7 Replies)
I have a file that has been partially recoded so that data points that were formerly letter combinations are now -1, 0, or 1. I need to finish recoding the GG and CC data points. The file looks like this:
ID 1 2 3 4 5 6 7 8
83845676 0 0 0 0 CC -1 CC CC
838469. -1 -1 1 GG CC 0 CC 1
83847041... (10 Replies)
hiii, Help me out..i have a huge set of data stored in a file.This file has has 2 columns which is latitude & longitude of a region. Now i have a program which asks for the number of points & based on this number it asks the user to enter that latitude & longitude values which are in the same... (7 Replies)
Hi,
I am trying to arrange my graphs with GNUPLOT. Although it looked like simple at the beginning, I could not figure out an answer for the following: I want to change the style of my data points (not the line, just exact data points) The terminal assigns first + and then x to them but what I... (0 Replies)
Hi,
I have a file with one column data (sample below) and I am trying to write a shell script to calculate the difference between consecutive data valuse i.e
Var = Ni -N(i-1)
0.3141
-3.6595
0.9171
5.2001
3.5331
3.7022
-6.1087
-5.1039
-9.8144
1.6516
-2.725
3.982
7.769
8.88 (5 Replies)
I have a text file that shows the output of my solar inverters. I want to separate this into sections. overview , device 1 , device 2 , device 3. Each device has different number of lines. but they all have unique starting points. Overview starts with 6 #'s, Devices have 4#'s and their data starts... (6 Replies)
I need to rank a large number of data points that exist in multiple files. My data points (Column 3) are based on unique values in columns 1 and 2. I need to rank the values that are in File 1, Column 3.
For instance:
Input File 1
AAA BBB 10
CCC DDD 16
EEE FFF 20
Input File 2
... (47 Replies)
Discussion started by: ncwxpanther
47 Replies
LEARN ABOUT PHP
mongocollection.aggregatecursor
MONGOCOLLECTION.AGGREGATECURSOR(3) 1 MONGOCOLLECTION.AGGREGATECURSOR(3)MongoCollection::aggregateCursor - Execute an aggregation pipeline command and retrieve results through a cursor
SYNOPSIS
public MongoCommandCursor MongoCollection::aggregateCursor (array $command, [array $options])
DESCRIPTION
With this method you can execute Aggregation Framework pipelines and retrieve the results through a cursor, instead of getting just one
document back as you would with MongoCollection::aggregate. This method returns a MongoCommandCursor object. This cursor object implements
the Iterator interface just like the MongoCursor objects that are returned by the MongoCollection::find method.
Note
The resulting MongoCommandCursor will inherit this collection's read preference. MongoCommandCursor::setReadPreference may be used
to change the read preference before iterating on the cursor.
PARAMETERS
o $pipeline
- The Aggregation Framework pipeline to execute.
o $options
-Options for the aggregation command. Valid options include:
o "allowDiskUse"Allow aggregation stages to write to temporary files
o "cursor" It is possible to configure how many initial documents the server should return with the first result set. The
default initial batch size is 101. You can change it by adding the batchSize option:
<?php
$collection->aggregateCursor(
$pipeline,
[ "cursor" => [ "batchSize" => 4 ] ]
);
MongoCommandCursor::batchSize method on the returned MongoCommandCursor object.
o "explain" Return information on the processing of the pipeline. This option may cause the command to return a result docu-
ment that is unsuitable for constructing a MongoCommandCursor. If you need to use this option, you should consider using
MongoCollection::aggregate.
o "maxTimeMS"Specifies a cumulative time limit in milliseconds for processing the operation (does not include idle time). If
the operation is not completed within the timeout period, a MongoExecutionTimeoutException will be thrown.
RETURN VALUES
Returns a MongoCommandCursor object. Because this implements the Iterator interface you can iterate over each of the results as returned
by the command query. The MongoCommandCursor also implements the MongoCursorInterface interface which adds the MongoCommandCursor::batch-
Size, MongoCommandCursor::dead, MongoCommandCursor::info methods.
EXAMPLES
Example #1
MongoCollection.aggregateCursor(3) example
Finding all of the distinct values for a key.
<?php
$m = new MongoClient;
$db = $m->test;
$people = $db->people;
$people->drop();
$people->insert(array("name" => "Joe", "points" => 4));
$people->insert(array("name" => "Molly", "points" => 43));
$people->insert(array("name" => "Sally", "points" => 22));
$people->insert(array("name" => "Joe", "points" => 22));
$people->insert(array("name" => "Molly", "points" => 87));
$ages = $people->aggregateCursor( [
[ '$group' => [ '_id' => '$name', 'points' => [ '$sum' => '$points' ] ] ],
[ '$sort' => [ 'points' => -1 ] ],
] );
foreach ($ages as $person) {
echo "{$person['_id']}: {$person['points']}
";
}
?>
The above example will output something similar to:
Joe: 26 Sally: 22
Example #2
MongoCollection.aggregateCursor(3) example with different initial batch size
Finding all of the distinct values for a key.
<?php
$m = new MongoClient;
$db = $m->test;
$people = $db->people;
$people->drop();
/* Insert some sample data */
$people->insert(array("name" => "Joe", "points" => 4));
$people->insert(array("name" => "Molly", "points" => 43));
$people->insert(array("name" => "Sally", "points" => 22));
$people->insert(array("name" => "Joe", "points" => 22));
$people->insert(array("name" => "Molly", "points" => 87));
/* Run the command cursor */
$ages = $people->aggregateCursor(
[
[ '$group' => [ '_id' => '$name', 'points' => [ '$sum' => '$points' ] ] ],
[ '$sort' => [ 'points' => -1 ] ],
],
[ "cursor" => [ "batchSize" => 4 ] ]
);
foreach ($ages as $person) {
echo "{$person['_id']}: {$person['points']}
";
}
?>
The above example will output something similar to:
Joe: 26 Sally: 22
SEE ALSO
MongoDB::command, MongoCommandCursor, MongoCommandCursor::batchSize, MongoCollection::aggregate, The MongoDB aggregation framework.
PHP Documentation Group MONGOCOLLECTION.AGGREGATECURSOR(3)