Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign uppreview mode not work #7
Comments
|
I don't really use notebook, is that RStudio specific, or a general problem? |
|
I think it is Rstudio specific. but I have seen this happened to other packages but fixed afterwards quickly so I guess it is not a difficult fix. Also could you provide a default option to output median [Q1,Q3]? I think this is more academically standard from a reviewer standpoint. If there are multiple variables needed to be presented in different format, how could I format them differently? say age for median[Q1,Q3] but weight for mean (SD). |
|
I will try to look into it, but I don't know when. If you can provide information on how notebook works in RStudio and how to feed it HTML that will be helpful. As to your other question, you can. Here is an example: library(table1)
dat <- data.frame(Age=runif(100, 40, 65), Weight=rnorm(100, 75, 10))
rndr <- function(x, name, ...) {
what <- switch(name,
Weight = "Mean (SD)",
Age = "Median [Q1, Q3]")
parse.abbrev.render.code(c("", what))(x)
}
table1(~ Age + Weight, data=dat, render=rndr)Edit: cleaned up the example slightly. |
|
This is working now in pull request #9. Do you want to test it? |
|
sure. just checked. Somehow it did not work the way as we expected. Could u
double check?
Hao
…On Wed, Jun 20, 2018 at 9:20 AM Benjamin Rich ***@***.***> wrote:
This is working now in pull request #9
<#9>. Do you want to test it?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AOSPYyrPG3O-XguRp9OMNls4wH5Q0S3vks5t-kwugaJpZM4UezO9>
.
|
|
Are you using the right branch? The change has not been merged into the master branch yet, so you want to be installing with: devtools::install_github("benjaminrich/table1#9") |
|
oh sorry. I was being stupid to forget that.
Hao
…On Wed, Jun 20, 2018 at 11:04 AM Benjamin Rich ***@***.***> wrote:
Are you using the right branch? The change has not been merged into the
master branch yet, so you want to be installing with:
devtools::install_github("benjaminrich/table1#9")
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AOSPY6mR8J1YGMa2-IIX7oVujfKrwbsvks5t-mR6gaJpZM4UezO9>
.
|
|
Hi Benjamin,
I had some trouble using the "
devtools::install_github("benjaminrich/table1#9")
"
command.
It says that:
devtools::install_github("benjaminrich/table1#9")
Downloading GitHub repo benjaminrich/table1@issue-#7
from URL https://api.github.com/repos/benjaminrich/table1/zipball/issue-#7
Installation failed: 404: Not Found
(404)
I got an error message after installing table1 from github.
Error: package or namespace load failed for ‘table1’ in get(Info[i, 1],
envir = env):
lazy-load database
'/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Formula/R/Formula.rdb'
is corrupt
In addition: Warning message:
In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1
…On Wed, Jun 20, 2018 at 12:00 PM, Hao Deng ***@***.***> wrote:
oh sorry. I was being stupid to forget that.
Hao
On Wed, Jun 20, 2018 at 11:04 AM Benjamin Rich ***@***.***>
wrote:
> Are you using the right branch? The change has not been merged into the
> master branch yet, so you want to be installing with:
>
> devtools::install_github("benjaminrich/table1#9")
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#7 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AOSPY6mR8J1YGMa2-IIX7oVujfKrwbsvks5t-mR6gaJpZM4UezO9>
> .
>
|
|
OK, my bad, it did not work as I expected. Try this instead: devtools::install_github("benjaminrich/table1@issue-%237") |
|
sorry still not working
…On Thu, Jun 21, 2018 at 2:05 AM, Benjamin Rich ***@***.***> wrote:
OK, my bad, it did not work as I expected. Try this instead:
devtools::install_github("benjaminrich/table1", ref="issue-%237")
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AOSPYxCDxHOtE4lACdrMeSwyAukuZc08ks5t-zeWgaJpZM4UezO9>
.
|
|
Which one is still not working, the installation, or the preview in RStudio? |
|
the preview. I have tried using result. = asis but it did Not work as well.
…On Thu, Jun 21, 2018 at 9:47 AM Benjamin Rich ***@***.***> wrote:
Which one is still not working, the installation, or the preview in
RStudio?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AOSPY6069GHz2FKRDWCK7MaL7Ql14cFYks5t-6QBgaJpZM4UezO9>
.
|
|
I think it is related to ur rstudio or packages version? Any development
version of packages you are using
…On Thu, Jun 21, 2018 at 9:52 AM Benjamin Rich ***@***.***> wrote:
It is working for me. Here's a screenshot:
[image: screenshot_issue7]
<https://user-images.githubusercontent.com/17572252/41723282-a74a1390-7538-11e8-9a9e-2c2a7f27ca89.png>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AOSPYwFSgRH9J5p7DptOCHambm2z3ewMks5t-6UUgaJpZM4UezO9>
.
|
|
Here is the output of
Does that help? |
|
And my RStudio version is 1.1.453. |
|
I will switch to Rstudio newest version to see if this is the key.
…On Thu, Jun 21, 2018 at 10:31 AM Benjamin Rich ***@***.***> wrote:
And my RStudio version is 1.1.453.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AOSPY4KaA1t-RNU8oYVVwmThHXdyjGjGks5t-64KgaJpZM4UezO9>
.
|
|
Done. It is because of the version of rstudio
…On Thu, Jun 21, 2018 at 10:32 AM Hao Deng ***@***.***> wrote:
I will switch to Rstudio newest version to see if this is the key.
On Thu, Jun 21, 2018 at 10:31 AM Benjamin Rich ***@***.***>
wrote:
> And my RStudio version is 1.1.453.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#7 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AOSPY4KaA1t-RNU8oYVVwmThHXdyjGjGks5t-64KgaJpZM4UezO9>
> .
>
|
|
Excellent. Then I am closing the issue. Thanks. |
|
sounds good! Great job!
…On Thu, Jun 21, 2018 at 11:47 AM Benjamin Rich ***@***.***> wrote:
Excellent. Then I am closing the issue. Thanks.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AOSPY7i_LF5iaOGlRgJWbu2fdRoOfoiQks5t-8AogaJpZM4UezO9>
.
|

the html table will be shown in viewer mode not inline mode. works fine in knit html but not notebook.