rdatasets 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +1 -1
- data/lib/rdatasets.rb +14 -2
- data/lib/rdatasets/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a46abed3f289f2dfebb6f28071d802c05d8b2a4a227749a60680db49ae4723a8
|
4
|
+
data.tar.gz: 1926223ce67700e6f4bc2dceb0439092cc0e0e18c78040e0f6f77c599fd28e04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44e3e59bb2feb08c8baf583e4955c8da76292187d3d8e07feae9094fc4cf358d8824a8cce86143614ffdae122d57c6a41e57798b07faf9c12c327eb97ce65e67
|
7
|
+
data.tar.gz: 4c81ba19319dcb0ab6c59f6797e460d3ed02cfe7b7f65019bcc2ce74890bff14b5eddd8c3213b63e152ee82794f9612b904ac162e0cbcd94ebe45e2fc1d86f35
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rdatasets (0.4.
|
4
|
+
rdatasets (0.4.2)
|
5
5
|
daru
|
6
6
|
|
7
7
|
GEM
|
@@ -15,7 +15,7 @@ GEM
|
|
15
15
|
packable (1.3.10)
|
16
16
|
backports
|
17
17
|
parallel (1.13.0)
|
18
|
-
parallel_tests (2.
|
18
|
+
parallel_tests (2.28.0)
|
19
19
|
parallel
|
20
20
|
rake (10.5.0)
|
21
21
|
rspec (3.8.0)
|
data/README.md
CHANGED
data/lib/rdatasets.rb
CHANGED
@@ -65,9 +65,21 @@ module RDatasets
|
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
|
+
# Search available datasets. (items and titles)
|
69
|
+
# If the argument is a string, ignore case.
|
70
|
+
# @param pattern [String, Regexp] :The pattern to search for
|
71
|
+
# @return [Daru::DataFrame]
|
72
|
+
def search(pattern)
|
73
|
+
pattern = /#{pattern}/i if pattern.is_a? String
|
74
|
+
p pattern
|
75
|
+
datasets.filter(:row) do |row|
|
76
|
+
row['Item'] =~ pattern || row['Title'] =~ pattern
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
68
80
|
# Check if the index of original r dataset is sequential.
|
69
|
-
def original_index_is_sequential?(
|
70
|
-
|
81
|
+
def original_index_is_sequential?(dataframe)
|
82
|
+
dataframe[0].to_a == [*1..dataframe.size]
|
71
83
|
end
|
72
84
|
private_class_method :original_index_is_sequential?
|
73
85
|
end
|
data/lib/rdatasets/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdatasets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kojix2
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: daru
|