Re: [R] Col names in a data frame

2021-01-21 Thread Jan T. Kim via R-help
it looks to me that the names are cranked through make.names for data frames case while that doesn't happen for matrices. Peeking into the `colnames<-` code supports this idea, but that in turn uses `names<-` which is a primitive and so defies further easy peeking. The data.frame function provides

Re: [R] Function in default parameter value closing over variables defined later in the enclosing function

2019-01-23 Thread Jan T Kim via R-help
Hi Duncan, On Wed, Jan 23, 2019 at 10:02:00AM -0500, Duncan Murdoch wrote: > On 23/01/2019 5:27 a.m., Jan T Kim wrote: > >Hi Ivan & All, > > > >R's scoping system basically goes to all environments along the call > >stack when trying to resolve an unbound vari

Re: [R] Function in default parameter value closing over variables defined later in the enclosing function

2019-01-23 Thread Jan T Kim
Hi Ivan & All, R's scoping system basically goes to all environments along the call stack when trying to resolve an unbound variable, see the language definition [1], section 4.3.4, and perhaps also 2.1.5. Generally, unbound variables should be used with care. It's a bit difficult to decide wheth

Re: [R] reading data problem

2018-09-24 Thread Jan T Kim via R-help
read > data: a<-read.csv("for_R_graphs.csv", header=T, sep=",") > > On Mon, Sep 24, 2018 at 2:07 PM Jan T Kim via R-help > wrote: > >> Yet one more: have you tried adding quote="" to your read.table >> parameters? Quote characters have a 50% chance

Re: [R] reading data problem

2018-09-24 Thread Jan T Kim via R-help
Yet one more: have you tried adding quote="" to your read.table parameters? Quote characters have a 50% chance of being balanced, and they can encompass multiple lines... On Mon, Sep 24, 2018 at 11:40:47AM -0700, Bert Gunter wrote: > One more question: > > 5. Have you tried shutting down, restart

Re: [R] R shared library (/usr/lib64/R/lib/libR.so) not found.

2018-08-23 Thread Jan T Kim via R-help
Hi Rolf & All, I haven't built R in a while, but my general expectation of an autotools based build & install would be that the default prefix is /usr/local, rather than /usr. So I'd expect the shared libs in /usr/local/lib, /usr/local/lib64 etc. I also have a recollection that I once installed R

Re: [R] How to reach the column names in a huge .RData file without loading it

2016-03-19 Thread Jan T Kim
s process several times, > >> > so it takes so long to load the file first and then take the colnames! > >> > > >> > Thanks > >> > > >> > [[alternative HTML version deleted]] > >> > > >> >

Re: [R] Help with functions as arguments

2013-02-12 Thread Jan T Kim
6POCa8HrX7H4 > UBsPfwSEkOfyIEwq5drKjXF853nUNRVtd0cPA+mpo+5y/qIkGTiehMRlEGwcBBg7 > 6uNA8wpTuJI49tdY7rkVEIEGH34atwvBA1kwFYh1UfBzzIg+oRikHm1ZJ4UeJCM= > =h9ju > -END PGP SIGNATURE- > > __ > R-help@r-project.org mai

Re: [R] Writing escaped unicode

2012-12-11 Thread Jan T Kim
""); should work with the Ruby client you try to talk to. Obviously, this bloats the string rather more than necessary (particularly if most of the characters are in the ASCII range), but if the volume you're piping into the client is small, this ma

Re: [R] pass by reference

2012-08-14 Thread Jan T Kim
/stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- +- Jan T. Kim ---+ | email: jtt...@gmail

Re: [R] Best Programming Practices regarding data frames

2012-08-02 Thread Jan T Kim
g guide http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the

Re: [R] Singleton pattern

2012-03-16 Thread Jan T. Kim
_ > > R-help@r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. > >

Re: [R] "A critique of R and S-PLUS"

2008-10-30 Thread Jan T. Kim
he majority of functions provided by standard packages don't operate on environments, though. Best regards, Jan -- +- Jan T. Kim ---+ | email: [EMAIL PROTECTED]| | WWW: http://

Re: [R] Programming Concepts and Philosophy

2008-06-20 Thread Jan T. Kim
that there should be a one-to-one correspondence between instances in the program and objects in the "real world" (problem domain etc.), and having no references makes achieving this difficult (and quite impossible for more complex systems). Best regards, Jan -- +- Jan T. Kim

Re: [R] Measuring dispersion

2008-06-18 Thread Jan T. Kim
loating point processing) > >> [0; 0.1; 0.1; 0.15; 1] - function should be > 1 > var(diff(c(0, 0.1, 0.1, 0.15, 1))) [1] 0.1616667 Best regards, Jan -- +- Jan T. Kim ---+ | email: [EMAIL PROTECTED]

Re: [R] Plot timer in a for loop

2008-06-10 Thread Jan T. Kim
s, nrow(X) = 400. How? Adding the line Sys.sleep(0.5); to the loop should do this trick. Best regards, Jan -- +- Jan T. Kim ---+ | email: [EMAIL PROTECTED] | | WWW:

Re: [R] Question Regarding 'pipe'

2008-04-08 Thread Jan T. Kim
backslash. Otherwise R will interpret them to terminate or start a string -- essentially as awk would do with double quotes just the same. I'm still not convinced, though, that running that while loop using awk has any advantages over programming it in R, but it's your choice... Best re

Re: [R] Question Regarding 'pipe'

2008-04-08 Thread Jan T. Kim
ture, can you please describe explicitly how it "is not working", and also give a bit more context, such as a few lines of description of the content of temp.txt, and why you're trying to use awk (rather than R itself) to achieve whatever you're trying to achieve? Best rega

Re: [R] Thinking about using two y-scales on your plot?

2008-03-26 Thread Jan T. Kim
for (at least) 60 years! > > Hadley > > -- > http://had.co.nz/ > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guid

Re: [R] R as a programming language

2007-11-08 Thread Jan T. Kim
e a "functionconnection" which works like a textconnection but obtains input from / feeds output to a function. This would allow running an external process that receives input *and* provides output to R -- currently, p