search for: oknz

Displaying 18 results from an estimated 18 matches for "oknz".

Did you mean: konz
2019 Jun 06
0
[R] Open a file which name contains a tilde
How can expanding tildes anywhere but the beginning of a file name NOT be considered a bug? On Thu, 6 Jun 2019 at 23:04, Ivan Krylov <krylov.r00t at gmail.com> wrote: > On Wed, 5 Jun 2019 18:07:15 +0200 > Frank Schwidom <schwidom at gmx.net> wrote: > > > +> path.expand("a ~ b") > > [1] "a /home/user b" > > > How can I switch off
2024 Jan 30
1
Basic astronomy package recommendation wanted.
Given - UTC timestamp - a location (latitude,longitude,elevation) I want to know - the sun angles - the moon angles - the phase of the moon. I looked on CRAN for astronomy, but didn't notice anything that seems to offer what I want. I could try coding these functions myself, but "if you didn't write it you didn't wrong it".
2023 Apr 05
1
on lexical scoping....
R *does* search the environment stack. > search() [1] ".GlobalEnv" "package:stats" "package:graphics" [4] "package:grDevices" "package:utils" "package:datasets" [7] "package:methods" "Autoloads" "package:base What you seem to be missing is that a package may contain bindings that it
2020 Oct 31
0
FREDR and R 3.6
I'm running Ubuntu 18.04 LTS and r-base/bionic-cran35,now 3.6.3-1bionic all [installed] 3.6.3 is also the latest version in the repository. On Fri, 30 Oct 2020 at 12:21, Marc Schwartz via R-help <r-help at r-project.org> wrote: > > > On Oct 29, 2020, at 6:35 PM, H <agents at meddatainc.com> wrote: > > > > On 10/29/2020 01:49 PM, Marc Schwartz wrote: >
2023 Oct 13
1
if-else that returns vector
?ifelse 'ifelse' returns a value with the same shape as 'test' which is filled with elements selected from either 'yes' or 'no' depending on whether the element of 'test' is 'TRUE' or 'FALSE'. This is actually rather startling, because elsewhere in the S (R) language, operands are normally replicated to the length of the longer.
2019 Jun 08
0
[R] Open a file which name contains a tilde
...() when it *should*, to be consistent with the documentation, be calling tilde_expand_word(). as separate elements of the character vector. On Sat, 8 Jun 2019 at 04:10, Berry, Charles <ccberry at ucsd.edu> wrote: > > > > On Jun 6, 2019, at 2:04 PM, Richard O'Keefe <raoknz at gmail.com> wrote: > > > > How can expanding tildes anywhere but the beginning of a file name NOT be > > considered a bug? > > > > > > I think that that IS what libreadline is doing if one allows a whitespace > separated list of file names. > > As r...
2023 Jan 11
1
return value of {....}
I am more than a little puzzled by your question. In the construct {expr1; expr2; expr3} all of the expressions expr1, expr2, and expr3 are evaluated, in that order. That's what curly braces are FOR. When you want some expressions evaluated in a specific order, that's why and when you use curly braces. If that's not what you want, don't use them. Complaining about it is like
2024 Feb 29
1
Initializing vector and matrices
x <- numeric(0) for (...) { x[length(x)+1] <- ... } works. You can build a matrix by building a vector one element at a time this way, and then reshaping it at the end. That only works if you don't need it to be a matrix at all times. Another approach is to build a list of rows. It's not a matrix, but a list of rows can be a *ragged* matrix with rows of varying length. On Wed,
2023 Nov 06
1
strptime with +03:00 zone designator
...00 UTC" > > > > > > > Thanks > > Jim Holtman > *Data Munger Guru* > > > *What is the problem that you are trying to solve?Tell me what you want to > do, not how you want to do it.* > > > On Sun, Nov 5, 2023 at 3:45?PM Richard O'Keefe <raoknz at gmail.com> wrote: > >> I have some data that includes timestamps like this: >> 2017-02-28T13:35:00+03:00 >> The documentation for strptime says that %z expects >> an offset like 0300. I don't see any way in the documentation >> to get it to accept +hh:mm...
2024 Mar 26
1
Printout and saved results
Not clear what you mean by "saved". If you call a function and the result is printed, the result is remembered for a wee while in the variable .Last.value, so you can do > function.with.interesting.result(.......) > retained.interesting.result <- .Last.value or even > .Last.value -> retained.interesting.result If you know before you start writing the expression that you
2023 Nov 06
1
strptime with +03:00 zone designator
Thanks to all who replied. On Mon, 6 Nov 2023 at 18:37, Richard O'Keefe <raoknz at gmail.com> wrote: > OK, so the consensus is > (1) One cannot make strptime accept ISO8601-compliant zone designators > (2) The lubridate package can > (3) Or one can hack away with regex. > Lubridate it is, then. > > But I do regard strptime's inability to process IS...
2023 Oct 11
2
Problem with compatible library versions
There is a fairly straightforward way to load older versions of packages, and that is to use the 'groundhog' package. As the first sentence of https://groundhogr.com/ puts it: Make your R scripts reproducible by replacing library(pkg) with groundhog.library(pkg, date). pkg can be a vector of package names or a single name. On Wed, 11 Oct 2023 at 20:58, Uwe Ligges <ligges at
2024 Apr 13
1
Just for your (a|be)musement.
I recently had the chance to read a book explaining how to use ChatGPT with a certain programming language. (I'm not going to describe the book any more than that because I don't want to embarrass whoever wrote it.) They have appendix material showing three queries to ChatGPT and the answers. Paraphrased, the queries are "if I throw 2 (3, 4) fair dice, what is the probability I get
2023 Nov 05
3
strptime with +03:00 zone designator
I have some data that includes timestamps like this: 2017-02-28T13:35:00+03:00 The documentation for strptime says that %z expects an offset like 0300. I don't see any way in the documentation to get it to accept +hh:mm with a colon separator, and everything I tried gave me NA as the answer. Section 4.2.5.1 of ISO 8601:2004(E) allows both the absence of colons in +hh[mm] (basic format) and
2023 Apr 04
1
Simple Stacking of Two Columns
Just to repeat: you have NamesWide<-data.frame(Name1=c("Tom","Dick"),Name2=c("Larry","Curly")) and you want NamesLong<-data.frame(Names=c("Tom","Dick","Larry","Curly")) There must be something I am missing, because NamesLong <- data.frame(Names = c(NamesWide$Name1, NamesWide$Name2)) appears to
2024 Mar 02
1
Initializing vector and matrices
The matrix equivalent of x <- ... v <- ... x[length(x)+1] <- v is m <- ... r <- ... m <- rbind(m, r) or m <- ... k <- ... m <- cbind(m, c) A vector or matrix so constructed never has "holes" in it. It's better to think of CONSTRUCTING vectors and matrices rather than INITIALISING them, because always being fully defined is important. It
2020 Oct 13
0
Please need help to finalize my code
What do you *mean* "when you want to use the kernels". WHICH kernels? Use to do WHAT? In your browser, visit cran.r-project.org then select "Packages" from the list on the left. Then pick the alphabetic list. Now search for 'kernel'. You will find dozens of matches. On Wed, 14 Oct 2020 at 05:15, PIKAL Petr <petr.pikal at precheza.cz> wrote: > Hm. Google tells
2023 Jan 15
3
return value of {....}
I wonder if the real confusino is not R's scope rules? (begin .) is not Lisp, it's Scheme (a major Lisp dialect), and in Scheme, (begin (define x ...) (define y ...) ...) declares variables x and y that are local to the (begin ...) form, just like Algol 68. That's weirdness 1. Javascript had a similar weirdness, when the ECMAscript process eventually addressed. But the real