Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What should be in the {r2eng} dictionary? #1

Open
matt-dray opened this issue Jul 12, 2020 · 13 comments
Open

What should be in the {r2eng} dictionary? #1

matt-dray opened this issue Jul 12, 2020 · 13 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@matt-dray
Copy link
Owner

matt-dray commented Jul 12, 2020

What R symbols map to English translations? What are those translations? Please add comments with ideas to expand this list.

r eng
<- gets
-> into
= is
%>% then
%in% matches
| or
! not
? search help for
~ by
( open parenthesis
) close parenthesis
[ open square bracket
] close square bracket
{ open curly brace
} close curly brace

See gram.y file, cmd+F 'YYENGLISH 8'.

@matt-dray matt-dray added the enhancement New feature or request label Jul 12, 2020
@matt-dray matt-dray pinned this issue Jul 13, 2020
@mattkerlogue
Copy link

Suggest _ is translated as score rather than underscore to reduce length of snake case variable names. Maybe with an optional long or full argument to provide underscore if desired by the user.

@mattkerlogue
Copy link

Suggest common format for describing brackets/braces, and/or GB/US options.

r common/GB US
( open round bracket open paren(thesis)
) close round bracket close paren(thesis)
[ open square bracket open square bracket
[ close square bracket close square bracket
{ open curly bracket open (curly) brace
} close curly bracket open (curly) brace

Parenthesis and (curly) brace might not be terms everyone is familiar with, especially those with English as a second language.

@mattkerlogue
Copy link

Is .: "dot", "period", "point", "decimal point".

@mattkerlogue
Copy link

Is !! "bang-bang" or "double exclamation". Or something else.

@mattkerlogue
Copy link

Is {{ "(open) curly-curly", "(open) curly hug" or "open double curly (brackets)". With }} being "close…".

@mattkerlogue
Copy link

As [[ is a special operator perhaps needs to not be "open double square brackets", could be "open list select".

@matt-dray
Copy link
Owner Author

:: and :::?

package::x is 'package exported function x'? package:::y is 'package unexported function y'?

@mattkerlogue
Copy link

mattkerlogue commented Jul 13, 2020

Suggest x::y as "x package function y", x:::y "x package internal function y" … unless you're an r-dev you're less likely to need to know that functions are exported or internal.

@matt-dray
Copy link
Owner Author

matt-dray commented Jul 15, 2020

Backticks, single and double quotes.

@matt-dray
Copy link
Owner Author

:= ('walrus') as in DT[, col := val] parsed as LEFT_ASSIGN. Prefer 'set'?

@matt-dray
Copy link
Owner Author

  • token GT, text >, eng 'greater than'
  • token LT, text <, eng 'less than'
  • token GE, text >=, eng 'greater than or equal to'
  • token LE, text <=, eng 'less than or equal to'

@matt-dray
Copy link
Owner Author

matt-dray commented Jul 19, 2020

As per @mattkerlogue conversation, :: isn't always used for functions, of course. Could be package::object. It currently reads as 'x package function y' in {r2eng}. Maybe a case for looking ahead to see if it's a function or object before assigning :: its English translation.

@mattkerlogue
Copy link

As per @mattkerlogue conversation, :: isn't always used for functions, of course. Could be package::object. It currently reads as 'x package function y' in {r2eng}. Maybe a case for looking ahead to see if it's a function or object before assigning :: its English translation.

Should be relatively easy to look ahead see if it's any function by using a regex detect for \\(.*\\)$. Also applies to ::: (I have non function internal objects in a couple of packages).

@matt-dray matt-dray added the question Further information is requested label Apr 27, 2024
@matt-dray matt-dray changed the title Expand the {r2eng} dictionary What should be in the {r2eng} dictionary? Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants