Re: [R] Words near one another.

2018-03-01 Thread Jeff Newmiller
Problem is not that your question is obvious, but that it is not clear what you want. However, you should be aware that R is a powerful programing language in which almost any algorithm you can find can be implemented. If you don't find answers when you Google or read the Text analysis Task Vi

Re: [R] Repeated use of dyn.load().

2018-03-01 Thread Rui Barradas
Hello, Inline. On 3/1/2018 6:44 PM, Eric Berger wrote: Good question Rolf. Rui, thanks for pointing out dyn.unload. When I started using Rcpp a couple of years ago I got burned by stale .so enough times that I adopted a policy of recompile-then-start new R session. My workflow does not includ

Re: [R] RExcel issues

2018-03-01 Thread Michael Ashton
Thanks though - didn’t know there was that ecosystem. I will try that list. > On Mar 1, 2018, at 5:37 PM, David Winsemius wrote: > > >> On Mar 1, 2018, at 2:02 PM, Michael Ashton >> wrote: >> >> Hi - >> >> For a while I've used RExcel without problems to run a repeating portfolio >> optim

Re: [R] RExcel issues

2018-03-01 Thread Michael Ashton
No, this is home use. I wasn’t even aware there was a commercial license. > On Mar 1, 2018, at 5:37 PM, David Winsemius wrote: > > >> On Mar 1, 2018, at 2:02 PM, Michael Ashton >> wrote: >> >> Hi - >> >> For a while I've used RExcel without problems to run a repeating portfolio >> optimiz

Re: [R] RExcel issues

2018-03-01 Thread David Winsemius
> On Mar 1, 2018, at 2:02 PM, Michael Ashton > wrote: > > Hi - > > For a while I've used RExcel without problems to run a repeating portfolio > optimization problem where I solve for a portfolio allocation targeting a > particular risk, then solve for a different risk, etc. I call the comman

[R] RExcel issues

2018-03-01 Thread Michael Ashton
Hi - For a while I've used RExcel without problems to run a repeating portfolio optimization problem where I solve for a portfolio allocation targeting a particular risk, then solve for a different risk, etc. I call the commands with (e.g.) rinterface.Rrun "(R command)" Recently that macro sta

Re: [R] Repeated use of dyn.load().

2018-03-01 Thread Eric Berger
Good question Rolf. Rui, thanks for pointing out dyn.unload. When I started using Rcpp a couple of years ago I got burned by stale .so enough times that I adopted a policy of recompile-then-start new R session. My workflow does not include Rolf's "brazillion" repeats, so the overhead of this approa

[R] KK transform - Kramers-kronig relations

2018-03-01 Thread Cleber N.Borges via R-help
Hello everyone Anyone know if there is implementation of Kramers-kronig relations[1] in any package? Thanks in advance for your attention. Cleber Borges [1] - https://en.wikipedia.org/wiki/Kramers%E2%80%93Kronig_relations --- Este email foi escaneado pelo Avast antivírus. https://www.avast.com/a

Re: [R] how to make row.names based on column1 with duplicated values

2018-03-01 Thread William Dunlap via R-help
You can do this with ave(): gene <- c("a","b","c","d","c","d","c","f") ave(gene, gene, FUN=function(x)if(length(x)>1)paste(x,seq_along(x),sep="-") else x) # [1] "a" "b" "c-1" "d-1" "c-2" "d-2" "c-3" "f" You can probably speed it up a bit by pulling the paste() out of FUN and doing it later.

Re: [R] Script file bug

2018-03-01 Thread Jeff Newmiller
Please always reply-all so the mailing list can record the answer along with your question. I am cc'ing this time. Thanks for the unusual case. -- Sent from my phone. Please excuse my brevity. On March 1, 2018 12:46:53 AM PST, zn l wrote: >It is my mistake. I find that I input # character in t

Re: [R] Repeated use of dyn.load().

2018-03-01 Thread Rui Barradas
Hello, In such cases, with C code, I call dyn.unload before loading the modified shared lib again. I don't know if this changed recently, but it used to be needed or else R wouldn't load the new lib. When I call dyn.unload followed by dyn.load I never had problems. (Or the other way around, c

Re: [R] how to make row.names based on column1 with duplicated values

2018-03-01 Thread PIKAL Petr
Hi You probably meant make.unique( gene, sep="-" ) [1] "a" "b" "c" "d" "c-1" "d-1" "c-2" "f" I second your objection to such name tweeking. Cheers Petr > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Jeff > Newmiller > Sent: Thursday, March

[R] Repeated use of dyn.load().

2018-03-01 Thread Rolf Turner
I am working with a function "foo" that explicitly dynamically loads a shared object library or "DLL", doing something like dyn.load("bar.so"). This is a debugging exercise so I make changes to the underlying Fortran code (yes, I acknowledge that I am a dinosaur) remake the DLL "bar.so" and

Re: [R] how to make row.names based on column1 with duplicated values

2018-03-01 Thread Jeff Newmiller
On Wed, 28 Feb 2018, Stephen HonKit Wong wrote: Dear All, Suppose I have a dataframe like this with many thousands rows all with different names: data.frame(gene=c("a","b","c","d","c","d","c","f"),value=c(20,300,48,55,9,2,100,200)), I want to set column "gene" as row.names, but there are duplic

Re: [R] Script file bug

2018-03-01 Thread Jeff Newmiller
On Thu, 1 Mar 2018, zn l wrote: Hi? There is a bug in R 3.4.3(kite-eating tree) in mac os x 10.13.3. If a script have a comment in the first line, any output of this script like plot won?t display in the screen. a) If this is specific to Mac, you will get better quality responses on r-sig-