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
[SPARK-20889][SparkR] Grouped documentation for NONAGGREGATE column methods #18422
Conversation
Test build #78643 has finished for PR 18422 at commit
|
jenkins, retest this please |
Test build #78646 has finished for PR 18422 at commit
|
Test build #78655 has finished for PR 18422 at commit
|
jenkins, retest this please |
Test build #78662 has finished for PR 18422 at commit
|
3057856
to
4e77d7b
Compare
Test build #78665 has finished for PR 18422 at commit
|
jenkins, retest this please |
Test build #78668 has finished for PR 18422 at commit
|
jenkins, retest this please |
2 similar comments
jenkins, retest this please |
jenkins, retest this please |
Test build #78713 has finished for PR 18422 at commit
|
Test build #78819 has finished for PR 18422 at commit
|
Test build #78817 has finished for PR 18422 at commit
|
jenkins, retest this please |
Test build #78824 has finished for PR 18422 at commit
|
R/pkg/R/functions.R
Outdated
NULL | ||
|
||
#' @details | ||
#' \code{lit}: A new \linkS4class{Column} is created to represent the literal value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this format is actually kinda weird. let's fix it? I don't think we need to link to Column
(yes, I think I added this...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated.
#' head(select(df, input_file_name())) | ||
#' } | ||
#' \dontrun{ | ||
#' tmp <- read.text("README.md") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why rename to tmp
though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid overwriting the dataframe example df
used throughout the doc.
R/pkg/R/functions.R
Outdated
#' | ||
#' @param x Column to compute on. | ||
#' @details | ||
#' \code{is.nan}: Alias for \link{isnan}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
roxygen does this by text order, I think - doesn't it make this go first, before isnan? perhaps we swap the order of code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, swapped the order.
#' tmp <- mutate(df, v1 = lit(df$mpg), v2 = lit("x"), v3 = lit("2015-01-01"), | ||
#' v4 = negate(df$mpg), v5 = expr('length(model)'), | ||
#' v6 = greatest(df$vs, df$am), v7 = least(df$vs, df$am), | ||
#' v8 = column("mpg")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there example for
nanvl(df$c, x)
coalesce(df$c, df$d, df$e)
that I've missed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See L2796.
R/pkg/R/functions.R
Outdated
#' @param x Column to compute on. In \code{lit}, it is a literal value or a Column. | ||
#' In \code{monotonically_increasing_id}, it should be empty. | ||
#' @param y Column to compute on. | ||
#' @param ... additional argument(s). In \code{expr}, it contains an expression character |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In \code{expr}, it contains an expression character
- this isn't quite right actually - it's in x
in expr, not as ...
parameter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and so in all other cases in this group, ...
is expected for other columns. perhaps we can say additional Columns
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, thanks for catching this.
R/pkg/R/functions.R
Outdated
#' | ||
#' @param x a literal value or a Column. | ||
#' @param x Column to compute on. In \code{lit}, it is a literal value or a Column. | ||
#' In \code{monotonically_increasing_id}, it should be empty. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and same for input_file_name
- btw, should be empty
might be a bit confusing? how about In ......., Should be used with no argument.
? or omitted
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I was just copying from the old doc.
I now remove this and add The method should be used with no argument.
to the two individual methods.
Test build #78855 has finished for PR 18422 at commit
|
#' head(tmp) | ||
#' tmp <- mutate(tmp, ind_na1 = is.nan(tmp$mpg_na), ind_na2 = isnan(tmp$mpg_na)) | ||
#' head(select(tmp, coalesce(tmp$mpg_na, tmp$mpg))) | ||
#' head(select(tmp, nanvl(tmp$mpg_na, tmp$hp)))} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@felixcheung Examples for coalesce
and nanvl
are here.
Test build #78871 has finished for PR 18422 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
merged to master |
…ethods ## What changes were proposed in this pull request? Grouped documentation for nonaggregate column methods. Author: actuaryzhang <actuaryzhang10@gmail.com> Author: Wayne Zhang <actuaryzhang10@gmail.com> Closes apache#18422 from actuaryzhang/sparkRDocNonAgg.
What changes were proposed in this pull request?
Grouped documentation for nonaggregate column methods.