Skip to content

Commit

Permalink
Rewrite of egen/erep, check in reshape
Browse files Browse the repository at this point in the history
  • Loading branch information
jmboehm committed Aug 7, 2020
1 parent 20494d5 commit b4b5fa8
Show file tree
Hide file tree
Showing 12 changed files with 789 additions and 490 deletions.
5 changes: 5 additions & 0 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ git-tree-sha1 = "10134f2ee0b1978ae7752c41306e131a684e1f06"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "1.0.7"

[[Pipe]]
git-tree-sha1 = "6842804e7867b115ca9de748a0cf6b364523c16d"
uuid = "b98c9c47-44ae-5843-9183-064241ee97a0"
version = "1.3.0"

[[Pkg]]
deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Expand Down
3 changes: 2 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
name = "Douglass"
uuid = "2218d074-27e7-5dc7-9146-ee5ed9a71057"
authors = ["Johannes Boehm <johannes.boehm@gmail.com>"]
version = "0.2.0"
version = "0.0.1"

[deps]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
DataFramesMeta = "1313f7d8-7da2-5740-9ea0-a2ca25f37964"
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
Pipe = "b98c9c47-44ae-5843-9183-064241ee97a0"
RDatasets = "ce6b1742-4840-55fa-b093-852dadbb1d8b"
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@

Douglass.jl is a package for manipulating DataFrames in Julia using a syntax that is very similar to Stata.

## Installation

Douglass is not registered. To install, type `]` in the Julia command prompt, followed by
```
add https://github.com/jmboehm/Douglass.jl.git
```

## Examples

```julia
Expand Down
2 changes: 2 additions & 0 deletions src/Douglass.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ module Douglass
include("commands/replace.jl")
include("commands/rename.jl")
include("commands/egen.jl")
include("commands/erep.jl")
# include("commands/egen2.jl")
include("commands/merge.jl")
include("commands/reshape.jl")
include("commands/duplicates.jl")
Expand Down
12 changes: 12 additions & 0 deletions src/commands/duplicates.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,16 @@ macro duplicates_drop!(t::Symbol,
unique!($t)
end
)
end


macro duplicates_assert(t::Symbol,
variables::Vector{Symbol})

esc(
quote
allunique(Tables.namedtupleiterator($t[!,$variables])) ||
error("$variables do not uniquely identify observations in DataFrame.")
end
)
end
Loading

0 comments on commit b4b5fa8

Please sign in to comment.