Added R column to Julia cheatsheet
This commit is contained in:
parent
02faf5c53c
commit
2ac6ef5e0b
@ -1,22 +1,21 @@
|
|||||||
## "meta"-tools
|
## "meta"-tools
|
||||||
|
|
||||||
|
| | Julia | Python | R |
|
||||||
| | Julia | Python |
|
|--------------------|------------------|------------------|------------------|
|
||||||
|------------------------|------------------------|------------------------|
|
| Documentation | `?obj` | `help(obj)` | `?obj` , `help(obj)` |
|
||||||
| Documentation | `?obj` | `help(obj)` |
|
| Object content | `dump(obj)` | `print(repr(obj))` | `str(obj)` |
|
||||||
| Object content | `dump(obj)` | `print(repr(obj))` |
|
| Exported functions | `names(FooModule)` | `dir(foo_module)` | `ls("package:foo_module")` |
|
||||||
| Exported functions | `names(FooModule)` | `dir(foo_module)` |
|
| List function signatures with that name | `methods(myFun)` | | `methods(myFun)` |
|
||||||
| List function signatures with that name | `methods(myFun)` | |
|
| List functions for specific type | `methodswith(SomeType)` | `dir(SomeType)` | `methods(SomeType)` |
|
||||||
| List functions for specific type | `methodswith(SomeType)` | `dir(SomeType)` |
|
| Where is ...? | `@which func` | `func.__module__` | |
|
||||||
| Where is ...? | `@which func` | `func.__module__` |
|
| What is ...? | `typeof(obj)` | `type(obj)` | `class(obj)` |
|
||||||
| What is ...? | `typeof(obj)` | `type(obj)` |
|
| Is it really a ...? | `isa(obj, SomeType)` | `isinstance(obj, SomeType)` | `is(obj, SomeType)` |
|
||||||
| Is it really a ...? | `isa(obj, SomeType)` | `isinstance(obj, SomeType)` |
|
|
||||||
|
|
||||||
## debugging
|
## debugging
|
||||||
|||
|
|
||||||
|--|--|
|
|
||||||
`@run sum(5+1)`| run debugger, stop at error/breakpoints
|
|
||||||
`@enter sum(5+1)` | enter debugger, dont start code yet
|
|
||||||
`@show variable` | prints: variable = variablecontent
|
|
||||||
`@debug variable` | prints only to debugger, very convient in combination with `>ENV["JULIA_DEBUG"] = ToBeDebuggedModule` (could be `Main` as well)
|
|
||||||
|
|
||||||
|
| | |
|
||||||
|
|------------------------------------|------------------------------------|
|
||||||
|
| `@run sum(5+1)` | run debugger, stop at error/breakpoints |
|
||||||
|
| `@enter sum(5+1)` | enter debugger, dont start code yet |
|
||||||
|
| `@show variable` | prints: variable = variablecontent |
|
||||||
|
| `@debug variable` | prints only to debugger, very convient in combination with `>ENV["JULIA_DEBUG"] = ToBeDebuggedModule` (could be `Main` as well) |
|
||||||
|
Loading…
Reference in New Issue
Block a user