« first day (672 days earlier)      last day (2630 days later) » 

 
2 hours later…
 
2 hours later…
4:09 AM
@SymbolixAU thank you .. :) Looks cool, will have a look at the package.
 
@RonakShah - you're welcome. Note, I'm also using the package gepaf to do the line encoding. Eventually I'll write my own encoding algorithm, but for now this will do
And, you don't have to do the encoding step, you can use the lat/lon coordinates directly.
The polyline encoding is a way of 'compressing' a list of coordinates so that there's less data being passed to your browser .
details here https://developers.google.com/maps/documentation/utilities/polylinealgorithm if you're interested
 
4:45 AM
yup..sure! I'll do the reading. As I am new to visualization as whole it might take me some time to catch up.
 
 
2 hours later…
7:13 AM
@Queen k
Hello
 
Morning good ppl :)
 
morning
 
hello @ all
 
When you tag with tidyverse, then you don't need to tag with all included packages like: dplyr, magrittr, purrr, etc ?
 
I guess so
 
morning
 
9:06 AM
Morning all!
 
Hello
 
10:16 AM
SO offline
 
Yup..
 
Anyone want to add splitstack version to this post? stackoverflow.com/questions/42387859
 
And I just ask a question...
 
@m0nhawk you broke SO
 
Does someone know how to make parent-child in ElasticSearch in different indices?
 
10:24 AM
@zx8754 lol :)
 
and its back..
 
Not here
Now its up :)
 
10:42 AM
@Sotos wide is default in cSplit, you can skip that
 
@m0nhawk Unsure of what you mean
 
@RonakShah I know. I just like to include it for readability
 
Nice solution btw, I just did cSplit and was wondering what to do next..
 
Thanks. I am trending mtabulate :)
 
10:56 AM
Well, just search in multiples indices
Should work, indices are just a way to avoid loading a too much data in memory, but AFAICT if you search in multiples indices all of them will be "merged" in memory before the search is done.
Wich a query type ?
 
@DavidArenburg or: dcast(setDT(test)[, unlist(tstrsplit(col, "; |;")), 1:nrow(test)], nrow ~ V1)
 
curl -XGET 'http://I1frels01/logstash-2017.02.22,logstash-2017.02.21,logstash-2017.02.20/_s‌​earch -d '{your search}' . You can try like this @m0nhawk (replacing the indices names of course)
 
@Tensibai Thanks. But I need to have parent in different index.
 
In my example the indices are logstash-DATE
I'm doing a search (standard one) in 3 indices here.
Or I don't get what you're after :p
And according to the documentation it works on multiples indices
Quoting:
 
11:06 AM
With what reason do we flag a comment with a link to a wrong dupe?
 
When set to true the ignore_unmapped option will ignore an unmapped type and will not match any documents for this query. This can be useful when querying multiple indexes which might have different mappings.
@zx8754 unsure not constructive ? or custom
 
@zx8754 maybe other and explain your reason
 
11:26 AM
@Tensibai Thanks! Much better now.
 
11:41 AM
@Tensibai Unfortunately, didn't work...
 
--^ or unclear...
 
12:26 PM
Anybody is aware about the curl package ?
When I am doing devtools::install_github("SymbolixAU/googleway"), it says
Error in loadNamespace(name) : there is no package called ‘curl’
 
then install curl
 
install.packages("curl")
 
install.packages('curl')?
 
and when i do install.packages("curl")
 
hahah
 
12:27 PM
ackage ‘curl’ is not available (for R version 3.2.3)
 
either upgrade R, or get old version of curl as zip file
 
@zx8754 was going through this Any ideas?
Any way I could upgrade R from RStudio?
 
@RonakShah Not really. There's an installr package, but it's not worth the hassle imo.
 
Download latest R from cran, Rstudio will default to new version
 
Hmm...okay. Let me do that. Thanks.
 
@Natty tp
 
@Queen k
 
Someone hammer that ^. Nurkas answering of so obvious dupes is fraustrating
 
@Sotos done :-)
 
Thanks @Jaap :)
 
@Natty tp
 
 
1 hour later…
 
1 hour later…
4:12 PM
@akrun, don't really think that this is a duplicate of the one you've linked to as this is clearly R related and the other one is about bash. — takje 2 mins ago
so that's new
 
@Queen k
 
^-- Not correct
 
5:13 PM
close as RTFM, RTF code, etc. stackoverflow.com/q/42397273
 
5:42 PM
 
thanks mOonhawk, Bhargav
 
@Queen k
 
Time to have some SO activity. :)
 
5:48 PM
@Bhargav i think y'all SOBotics/charcoal folks should link together your meta posts. e.g., this meta.stackexchange.com/questions/291301/… looked like a repost until i dug out the original meta.stackoverflow.com/questions/280546/… that is somehow not mentioned in the new post..?
ditto your own "Can a machine..?" q
if not linked in the meta post, at least linked in the front page of the charcoal site that y'all refer us to
 
It was Andy's words itself, so he did not link it. :)
 
well, seems odd to divorce it from that context, but ok
 
I asked him to add the link.
 
@BhargavRao ok, or make some list of projects with meta links on charcoal itself or something. it's not super easy to see what y'all have been up to and to find the community feedback on it
@BhargavRao oh, didn't realize you weren't part of the team, just sort of conflated charcoal with sobotics in my head
 
6:00 PM
@Frank I'll tell that to Andy. But I think, they'll have already created a web page for that.
@Frank Yep, Sobotics concentrates only on Stack Overflow. Charcoal focuses on Stack Exchange
 
ah, i see
 
"Daily vote limit reached; vote again in 5 hours." :D
 
7:07 PM
@m0nhawk now you can start answering questions ;-)
 
was thinking the same thing :)
 
7:31 PM
thanks, i still have a lot to learn about debugging, unit testing, general software dev stuff
 
7:57 PM
 
8:20 PM
@zx8754 most deleteworthy OP i've seen in a while
 
I am guessing they copied and pasted those dates, they could read as text file, or add quotes with "find & replace".... anyway, close unclear.
 
and that nonsense about "date" vs Date, eesh
 
didn't read that far
Do you have some limit on how many rows of R code should be in one file?
 
8:43 PM
@zx8754 i close your question as unclear
you mean is there a limit imposed by r or by common practice?
 
@Frank sorry, common practice
 
8:59 PM
@zx8754 oh, i max out around 1200 with my current set of ~10 scripts, fwiw
i guess if it got much longer i'd find a way to make it shorter: split into scripts to be run sequentially, write more in functions or something
 
I am around 600-800, and getting a bit lost after re-visiting after a break.
Do you run your code chunk by chunk, select + run, or selectAll + run?
 
i source() files of "helper" functions, and don't really care how large those get, since they're very easy to navigate
 
Same here, I source helpers
 
@Frank Debugging in Rstudio is, at least for me, a total pain in the ass.
 
@zx8754 i select and run (to select, i don't drag, rather: put the cursor one place, scroll elsewhere, press shift, click), however, now my 10 scripts each have their own I/O and logging and are called via command line from a "main.r" file governing them
 
9:05 PM
As soon as I enter a browser() call into an anonymous functions, a feking window pops up.
 
@RomanLuštrik agree, tried out to test it, never used it for real debugging.
 
oh, never used RStudio for debugging, i kind of assumed it had better tools for it
 
Some parts are great, but the popping up of the debugging window is very irritating for me.
 
@RomanLuštrik in general, i think RStudio would benefit from more user control over its windows. it's nice that the script subwindow can pop out, but last i checked nothing else does (help window/tab, etc)
 
@zx8754 in my practise I mostly see the splitting by structure (helpers, io, analysis, reporting, visualization) and no limits on lines (usually be under 1000).
With docstrings and code folding it's easy to manage.
@RomanLuštrik I have tried debugging in Visual Studio + RTVS - it's much better and easier.
 
9:13 PM
@m0nhawk yeah, i split it the same way. by docstrings, you mean you're writing python or just python-like comments?
 
@Frank yeah, Python-like comments, RStudio can insert those.
 
ok
y'all have any solutions for logging?

i find r pretty poor in that regard (compared to Stata which just echoes everything from its console verbatim), or at least decidedly user-unfriendly
 
logging package. Similar to those I'm using in Python, Java and C++.
 
@m0nhawk hm, that seems to require writing logwarn in place of warnings everywhere. i'd rather just get logging for free without having a new dependency, etc
i hacked together a batch_r.r file and then call it like rscript.exe batch_r.r dofile.r logdir. seems to run a bit slower than running dofile.r directly, but at least i a usable log
 
And what's wrong with the dependency?
 
9:25 PM
@m0nhawk it is unmaintained and beta r-forge.r-project.org/projects/logging who knows when it'll become inconsistent with r and get removed from CRAN? (that is my thought about most dependencies)
nonetheless, i still might end up using that or something similar once i've learned how to properly do software development...
 
I just haven't found any other good options.
And logging isn't something you can develop forever. :)
 
that's true
fwiw, my pseudo-logger script:
 
13
A: Is there any standard logging package for R?

torinaAt the moment, there is still no native library for logging. But there are four of them available on cran: 1) logging - simple & log4j-like - resembles standart Python library - not maintaining since 2013, some issues detected upper 2) futile.logger (recommended! I am also using it) - active...

 
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)
pretty crude since i didn't bother learning anything about it first
@m0nhawk thanks, lulzlogr looks good, despite hadleyverse dependency. even there, though, when i'm running interactively i don't want a log, but when i'm running in batch i do, so inserting logmenow(), unlogmenow(), etc in my code is fairly unappealing
 
9:40 PM
... this is the elegant solution. I must be getting old.
1
A: merge two or more simulations

user5249203Instead of passing variables to replicate you can do this. code fun <- function( ){ first <- rweibull(7,3.28,2.14) second <- rweibull(7,3.33,2.112) } replicate( 2, fun() )

 
10:01 PM
@Frank And I'll look into futile.logger.
 
yeah, that one also looks good
 
10:14 PM
@Frank @RomanLuštrik I posted that link earlier because it showed me the menu item Debug / On Error / Error Inspector (instead of "Break in Code") which stops the browser from popping up all the time. Seems like it should be the default, really.
 
ok
really important that this ancient q be tagged with "vector" apparently stackoverflow.com/questions/29463804/…
the two-years-late comment is also a great help
 
@Frank Not that acient... I would say pre-2009 is acient. :P
 
yeah, that's fair, i'd call that "prehistoric" since almost no r users were here :)
looks like even JD wasn't here until 2009. got this deleteworthy post from our mod: stackoverflow.com/questions/420296/…
oh nvm, not a mod yet it seems
close as homework if so inclined stackoverflow.com/q/42403397
 
 
1 hour later…

« first day (672 days earlier)      last day (2630 days later) »