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

Not printed out this data.table when I not wanted #869

Closed
JBreidaks opened this issue Oct 8, 2014 · 7 comments
Closed

Not printed out this data.table when I not wanted #869

JBreidaks opened this issue Oct 8, 2014 · 7 comments

Comments

@JBreidaks
Copy link

library(data.table) #version 1.9.4
estim <- data.table(aa=c(1,2,3), vvat1at=c(1,5,16))
checked=TRUE

If had some check and it is TRUE, then in variable estim create new variable a with value 1.

if (checked) estim[, a:=1] 

But automatically printed out data.table.

#      aa  vat1at    a
#1:   1       1     1
#2:   2       5     1
#3:   3      16     1

Can some something to do that not printed out this data.table when I not wanted?

@JBreidaks
Copy link
Author

library(data.table) version 1.9.4 data <- data.table(v=c(2,2,3))

data[v<1, v:=3]

If checking is FALSE, then print out all data.table.

@arunsrinivasan
Copy link
Member

It's very hard to understand what you're trying to say here. I'm guessing it's about automatic printing when using :=?

@mattdowle
Copy link
Member

Yes. It's a follow up from off list with me. I been struggling with it for a while but think there's a reasonable solution that fixes the knitr printing issue as well ...

@ywhcuhk
Copy link

ywhcuhk commented Aug 3, 2015

It still prints for DT[, LHS := RHS]. I installed the develop version following the instruction:

library(devtools)
install_github("Rdatatable/data.table", build_vignettes = FALSE)

My system info:

platform       x86_64-apple-darwin13.4.0   
arch           x86_64                      
os             darwin13.4.0                
system         x86_64, darwin13.4.0        
status                                     
major          3                           
minor          2.0                         
year           2015                        
month          04                          
day            16                          
svn rev        68180                       
language       R                           
version.string R version 3.2.0 (2015-04-16)
nickname       Full of Ingredients   

@shrektan
Copy link
Member

shrektan commented Aug 3, 2015

It's fine in my Mac and win7.

Can you provide the session info?

发自我的 iPhone

在 2015年8月3日,12:02,Wenhao Yang notifications@github.com 写道:

It still prints for DT[, LHS := RHS]. I installed the develop version following the instruction:

library(devtools)
install_github("Rdatatable/data.table", build_vignettes = FALSE)
My system info:

platform x86_64-apple-darwin13.4.0
arch x86_64
os darwin13.4.0
system x86_64, darwin13.4.0
status
major 3
minor 2.0
year 2015
month 04
day 16
svn rev 68180
language R
version.string R version 3.2.0 (2015-04-16)
nickname Full of Ingredients

Reply to this email directly or view it on GitHub.

@ywhcuhk
Copy link

ywhcuhk commented Aug 3, 2015

Session Info

R version 3.2.0 (2015-04-16)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.4 (Yosemite)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] xtable_1.7-4     lubridate_1.3.3  dplyr_0.4.2      data.table_1.9.5

loaded via a namespace (and not attached):
 [1] Rcpp_0.11.6.1   digest_0.6.8    assertthat_0.1  chron_2.3-47    R6_2.0.1       
 [6] plyr_1.8.1      DBI_0.3.1.9008  magrittr_1.5    stringi_0.4-1   lazyeval_0.1.10
[11] tools_3.2.0     stringr_1.0.0   parallel_3.2.0  memoise_0.2.1  

@shrektan
Copy link
Member

shrektan commented Aug 3, 2015

I reinstall the package and test the code below. It's perfectly fine. So, I have no idea.

I suggest you close all the R sessions, reinstall the package, and execute the code below.

library(data.table)
tmp <- data.table(a = 1:4)
tmp[, b := 1:4]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants