« first day (708 days earlier)      last day (2576 days later) » 

 
3 hours later…
@Natty tp
and good morning btw
 
6:23 AM
Good morning all
Morning @Jaap
 
@Natty tp
hi @Sotos
 
6:48 AM
Hey all :-)
 
 
1 hour later…
8:37 AM
for the above -----^ I find that more unclear than dupe...
 
Hhhmmm...so have a couple of lines in my code testing for near zero variance variables. When there aren't any it outputs integer(0) which then destroys my df(removes all columns) when the next line does df[,-nzv]...nzv = nearzerovariance
 
--^ closed within a minute
 
@RonakShah I 'd vote that as question of the week :)
 
Definitely, it is. Can't blame the first timers though. They aren't completely clear what can be asked and what cannot.
 
9:11 AM
Regarding my previous comment, does anyone have a better solution other than checking the length of the resulting nzv and if it is not 0 then exclude columns from the df?
 
@Sotos too broad / unclear what you're asking ;-)
Does anyone work with R "in" batch ? I have trouble seing "concretely" how commandArgs works...
 
@Cath hehe... basically I m just trying to find a way to remove 0 columns from a df ( df[-0] kind of thing)
 
@Sotos is.integer could be helpful ?? I mean integer(0) is true for is.integer for rest numbers it is false.
 
@RonakShah how do you mean that?
Ahhh negate it
 
yup..you can filter the integer(0) 's from that and then use it to subset
 
9:25 AM
Still needs coloring to work but I guess is the most appropriate way to go
Cool. Thanks @RonakShah :)
 
Welcome :-)
 
10:24 AM
How to use Greeks.......I am tempted to comment... "We are easy to use If you ask nicely" :D
4
 
 
1 hour later…
11:45 AM
5 messages moved to Trash can
 
12:02 PM
@Queen k
 
12:47 PM
Hi all..
is Member Technical Staff a good position to start off?
@Cath @DavidArenburg
@A5C1D2H2I1M1N2O1R2T1
sorry for the group ping..
Got an offer from a MNC company..
 
1:17 PM
Sound good.
Google'd a bit: sound really nice for a start.
 
Thanks for your tip :-)
 
1:33 PM
hi @AvinashRaj; sounds good to me, what is the job about?
 
@AvinashRaj You should just join Karadi Path--seriously. Be a part of a rapidly growing social enterprise. I'm sure by now you have a decent portfolio to show me ;-)
 
In the technical round, they asked me the questions regarding python and linux..
I think it's related to cloud VM
@A5C1D2H2I1M1N2O1R2T1 Just now I made a talk regarding the offer with my higher official.. Don't know whether he wants me to stay there or not.. Waiting for his reply..
 
@AvinashRaj I'll be able to give you direct involvement in decisions about our tech presence in the "ed-tech" space (sorry, in quotes because I don't like the term). Don't know what type of CTC you're at presently. You've got my email -- I'm happy to have a serious discussion about it away from chat if you'd like.
We're not an MNC, but we've pretty much been doubling our growth every year for the past 4 years, and that naturally gives great growth opportunities to everyone who sticks around.
Our impact has actually been more than doubling annually. 164 schools when I started. This year, we'll be in an estimated 2,300 schools across India....
 
imo working at smaller companies is often more fun & rewarding, so @AvinashRaj I think @A5C1D2H2I1M1N2O1R2T1 has made you a nice offer
I would cnsider that very seriously if I were you ....
 
ditto Jaap re working at smaller and mission-based outfits
 
@A5C1D2H2I1M1N2O1R2T1 I'll get in touch with you via email :-)
 
@AvinashRaj Looking forward to it!
 
@AvinashRaj Hi @Avinash :-) not a ninja anymore ? ;-)
 
2:01 PM
@Cath yeah, i use Rscript, with args = commandArgs(trailingOnly=TRUE) and then args[1], args[2], etc
 
@Frank you're the person I've been looking for then :-). what do you use it for ? I only know R batch via R CMD BATCH "blablabla.r" but then args is like -f etc and I don't see how it can be used...
 
Agree with @Jaap: smaller companies is much better for anyone, who are not junior and team lead. More fun, more tasks, more experiments and wider experience.
 
@Cath i write all my files so i can run them standalone interactively if i want to (so none of them actually take command args). i use command args for a wrapper that gives me a log file (below). i think the logging slows down runtime somewhat, but don't really mind:
args = commandArgs(trailingOnly=TRUE)

dofile  = if (tools::file_ext(args[1]) == "r") args[1] else paste0(args[1], ".r")
logdir  = sub("/$", "", args[2])

dofroot = tools::file_path_sans_ext(basename(dofile))
logfn   = file.path(logdir, sprintf("%s.log", dofroot))

file.create(logfn, showWarnings = FALSE)
con <- file(logfn)
sink(con, append=TRUE)
sink(con, append=TRUE, type="message")

cat(getwd(), "\n")
cat(dofile, "\n\n")

cat("Do file:\n\n")
source(dofile, echo=TRUE, max.deparse.length=10000)
so this script is batch_r.r, and i can call it via "batch_r.r my_script.r my_log_dir"
 
@m0nhawk Considering that we don't have a tech team in place, there'll be tons of experimentation--perhaps too much for some ;-)
 
@Frank thanks++ Frank :-) I see a lot of "commandArgs(trailingOnly=TRUE)" in scripts on github, that I try to understand, and I couldn't figure out what the result of this command could be :-/ Thanks !! :-)
 
2:09 PM
np :) i only wrote it once and so forgot what the trailingOnly does
 
@Cath If you need something more, than args[1], then take a look into optparse.
 
@m0nhawk thanks I'll have a look :-)
 
@A5C1D2H2I1M1N2O1R2T1 Than it's impressive: more experiments - more technical experience and faster self-development.
 
there's also Dirk's littler, though it has different syntax cran.r-project.org/web/packages/littler/vignettes/…
(and will continue to unless R core modifies Rscript to be like it github.com/eddelbuettel/littler/issues/32 )
 
@Frank Interesting. Thanks, I'll take a look. :)
 
2:40 PM
@Frank it permits to get only whats after --args so only the arguments. I'll probably start to use it (generic scripts you can run with "divers" arguments), I cannot believe I wasn't aware of this way of modifying interactively arguments. There some cases it's definitely better than for example sourcing a function and "hardcoding" the code with specific parameters. Did I say thanks ? ;-) :-)
@Frank lol I first read "litter"
 
@Cath :) btw, i do neither (i) sourcing nor (ii) hard-coding, since i want every script to work interactively or in batch. i pass almost all parameters via CSVs
source() seems really, really messy to me. i use it exclusively to read in functions
 
same, source is mostly (if not always) to source in some functions. Sourcing scripts that can modify directly objects is quite dangerous imo
 
yeah, also interactions between package loading (like A sources B; but B only runs if A loads certain packages; or later lines of A only run if B loads certain packages) or similarly for any objects in the environment, i guess
 
I totally agree
 
 
1 hour later…
 
1 hour later…
6:54 PM
yeesh, terribly q, imo stackoverflow.com/q/43125771 this is like saying "i have a vector like x = sprintf("% 5.2f", rnorm(10)) that i need to add 1 to, and no, x cannot be stored as a number ... because shiny"
 
@Queen k
@Frank hammered ;-)
 
@Jaap thanks :)
in this case, i think the answer is: finish your analysis before adding publishing flourishes like idiosyncratic names
had a client give me sanely formatted dates for months and then after it was over, send their "final" table with crazy dates: github.com/eddelbuettel/anytime/issues/24 GRR
was hoping to just hit it with anydate, but nope
now i've got to do all kinds of customized code to get around it
 
7:35 PM
ai caramba, that's a major setback
 
yeah, i'm glad to have Dirk's suggestion at least (gsub \\d with 0\\d or similar)
 
@Frank urgh
 
for future ref:
salDT0[, (dt_cols) := lapply(.SD, . %>% as.character %>% gsub("(?<=[^\\d]|^)(\\d)(?=[^\\d]|$)", "0\\1", ., perl=TRUE) %>% anytime()), .SDcols=dt_cols]
and i guess i'll have to do that for more tables besides... tbd
as.character since some cols may be 20170202 (integer)
 
@Frank Specify a format, though; his example there is incorrect:
R> as.Date("2/3/2016")
[1] "2-03-20"
...and I get "0002-03-20" anyway
 
@alistaire either way, not the right result, eh
 
7:49 PM
yeah
 
i cannot/don't want to specify a format, so that clients can send whatever they want. this table itself is built by rbindlist from many tables taken in by fread, so even within each column there may be inconsistent formats (which anytime fortunately handles well)
 
I don't think there's a great answer. You could use an assertions framework to determine a format, but it's a lot of work and hard to think of the possible arrangements.
 
anyway, my code above works and is robust enough for now
 

« first day (708 days earlier)      last day (2576 days later) »