Re: [R] Looking for simple line-splitting code

2025-02-05 Thread Kimmo Elo
Hi, using the library "stringi" allows this: > unlist(stringr::str_split(x, "\n")) [1] "abc" "def" """ghi" Best, Kimmo ke, 2025-02-05 kello 09:35 -0500, Duncan Murdoch kirjoitti: > Thanks to Rui, Peter and Tanvir! Peter's seems to be the fastest of > the > 3 suggestions so far on the littl

Re: [R] Looking for simple line-splitting code

2025-02-05 Thread Duncan Murdoch
On 2025-02-05 5:20 p.m., Rolf Turner wrote: On Wed, 5 Feb 2025 08:44:12 -0500 Duncan Murdoch wrote: If I have this object: x <- c("abc\ndef", "", "ghi") and I write it to a file using `writeLines(x, "test.txt")`, my text editor sees a 5 line file: 1: abc 2: def 3: 4: gh

Re: [R] Looking for simple line-splitting code

2025-02-05 Thread Rui Barradas
Hello, Inline. Às 20:27 de 05/02/2025, peter dalgaard escreveu: A 3rd option could be scan(text=x, what="", blank.lines.skip=FALSE) (all because readLines() doesn't obey the text=x convention, perhaps it should? I'm unsure whether the textConnection is left open in Rui's method.) No, it is

Re: [R] Looking for simple line-splitting code

2025-02-05 Thread Rolf Turner
On Wed, 5 Feb 2025 08:44:12 -0500 Duncan Murdoch wrote: > If I have this object: > >x <- c("abc\ndef", "", "ghi") > > and I write it to a file using `writeLines(x, "test.txt")`, my text > editor sees a 5 line file: > >1: abc >2: def >3: >4: ghi >5: > > which is what

Re: [R] Looking for simple line-splitting code

2025-02-05 Thread peter dalgaard
A 3rd option could be scan(text=x, what="", blank.lines.skip=FALSE) (all because readLines() doesn't obey the text=x convention, perhaps it should? I'm unsure whether the textConnection is left open in Rui's method.) -pd > On 5 Feb 2025, at 15:35 , Duncan Murdoch wrote: > > Thanks to Rui, Pe

Re: [R] Looking for simple line-splitting code

2025-02-05 Thread Duncan Murdoch
Thanks to Rui, Peter and Tanvir! Peter's seems to be the fastest of the 3 suggestions so far on the little test case, but on the real data (where x contains several thousand lines), Rui's seems best. Duncan On 2025-02-05 9:13 a.m., peter dalgaard wrote: This also seems to work: strsplit(pa

Re: [R] Looking for simple line-splitting code

2025-02-05 Thread Mohammad Tanvir Ahamed via R-help
x <- c("abc\ndef", "", "ghi") unlist(strsplit(gsub("^$", "\n", x), "\n")) or  x %>%   gsub("^$", "\n", .) %>%   strsplit("\n") %>%   unlist() Regards. Tanvir Ahamed Stockholm, Sweden |  mashra...@yahoo.com On Wednesday, February 5, 2025 at 02:44:37 PM GMT+1, Duncan Murdoch

Re: [R] Looking for simple line-splitting code

2025-02-05 Thread peter dalgaard
This also seems to work: > strsplit(paste(x,collapse="\n"),"\n")[[1]] [1] "abc" "def" """ghi" > On 5 Feb 2025, at 14:44 , Duncan Murdoch wrote: > > If I have this object: > > x <- c("abc\ndef", "", "ghi") > > and I write it to a file using `writeLines(x, "test.txt")`, my text editor >

Re: [R] Looking for simple line-splitting code

2025-02-05 Thread Rui Barradas
Às 13:44 de 05/02/2025, Duncan Murdoch escreveu: If I have this object:   x <- c("abc\ndef", "", "ghi") and I write it to a file using `writeLines(x, "test.txt")`, my text editor sees a 5 line file:   1: abc   2: def   3:   4: ghi   5: which is what I'd expect:  the last line in the e

[R] Looking for simple line-splitting code

2025-02-05 Thread Duncan Murdoch
If I have this object: x <- c("abc\ndef", "", "ghi") and I write it to a file using `writeLines(x, "test.txt")`, my text editor sees a 5 line file: 1: abc 2: def 3: 4: ghi 5: which is what I'd expect: the last line in the editor is empty. If I use `readLines("test.txt")` on th

Re: [R] Looking for package for data generation for classification and regression

2022-03-04 Thread Paul Smith
On Fri, Mar 4, 2022 at 8:07 AM Ranjan Maitra wrote: > > > I am in need of generating artificial data for machine learning > > classification and regression analysis. What I am looking for is > > something similar to Python sklearn.datasets.make_classification and > > sklearn.datasets.make_regressi

[R] Looking for package for data generation for classification and regression

2022-03-03 Thread Paul Smith
Dear All, I am in need of generating artificial data for machine learning classification and regression analysis. What I am looking for is something similar to Python sklearn.datasets.make_classification and sklearn.datasets.make_regression: https://scikit-learn.org/stable/modules/generated/sklea

Re: [R] Looking for R package to extract Concept from text files

2019-07-01 Thread Mehdi Dadkhah
Thank you so much! Have a nice day! With best regards, On Mon, Jul 1, 2019 at 11:16 AM Jeff Newmiller wrote: > Or https://cran.r-project.org/web/views/NaturalLanguageProcessing.html > > On June 30, 2019 11:13:10 PM PDT, Richard O'Keefe > wrote: > >Are you aware of https://www.tidytextmining.com

Re: [R] Looking for R package to extract Concept from text files

2019-07-01 Thread Mehdi Dadkhah
Thank you so much! Have a nice day! With best regards, On Mon, Jul 1, 2019 at 10:43 AM Richard O'Keefe wrote: > Are you aware of https://www.tidytextmining.com/ > > On Mon, 1 Jul 2019 at 16:57, Mehdi Dadkhah > wrote: > >> Thank you!! >> Have a nice day! >> With best regards, >> >> On Mon, Jul 1

Re: [R] Looking for R package to extract Concept from text files

2019-06-30 Thread Jeff Newmiller
Or https://cran.r-project.org/web/views/NaturalLanguageProcessing.html On June 30, 2019 11:13:10 PM PDT, Richard O'Keefe wrote: >Are you aware of https://www.tidytextmining.com/ > >On Mon, 1 Jul 2019 at 16:57, Mehdi Dadkhah >wrote: > >> Thank you!! >> Have a nice day! >> With best regards, >> >>

Re: [R] Looking for R package to extract Concept from text files

2019-06-30 Thread Richard O'Keefe
Are you aware of https://www.tidytextmining.com/ On Mon, 1 Jul 2019 at 16:57, Mehdi Dadkhah wrote: > Thank you!! > Have a nice day! > With best regards, > > On Mon, Jul 1, 2019 at 6:57 AM Abby Spurdle wrote: > > > > > > In parts of these reports, people may state their > > > reasons for do not

Re: [R] Looking for R package to extract Concept from text files

2019-06-30 Thread Mehdi Dadkhah
Thank you!! Have a nice day! With best regards, On Mon, Jul 1, 2019 at 6:57 AM Abby Spurdle wrote: > > > In parts of these reports, people may state their > > reasons for do not using such system. Is it possible to use R to only > > extract such reasons from all reports? > > Are the reports in p

Re: [R] Looking for R package to extract Concept from text files

2019-06-30 Thread Abby Spurdle
> In parts of these reports, people may state their > reasons for do not using such system. Is it possible to use R to only > extract such reasons from all reports? Are the reports in plain text format? Are there specific key words to search for? Are the reports in a certain order? If so, this mak

[R] Looking for R package to extract Concept from text files

2019-06-29 Thread Mehdi Dadkhah
Hi, I hope you are doing well! I have a question about R, could you please answer it? Please consider that we have some reports (for example 100 reports) which people presented their experience about use of a particular system. These reports are unstructured. In parts of these reports, people may

Re: [R] looking for 'tied rows' in dataframe

2019-03-19 Thread Evan Cooch
Good suggestion, and for my purposes, will solve the problem. Thanks! On 3/18/2019 12:37 PM, Ben Tupper wrote: > Hi, > > Might you replaced 'T' with a numeric value that signals the TRUE case > without rumpling your matrix? 0 might be a good choice as it is never an > index for a 1-based indexi

Re: [R] looking for 'tied rows' in dataframe

2019-03-18 Thread Ben Tupper
Hi, Might you replaced 'T' with a numeric value that signals the TRUE case without rumpling your matrix? 0 might be a good choice as it is never an index for a 1-based indexing system. hold=apply(test,1,which.max) hold[apply(test,1,isUnique)==FALSE] <- 0 hold [1] 1 2 0 > On Mar 17, 2019, a

Re: [R] looking for 'tied rows' in dataframe

2019-03-18 Thread Evan Cooch
Solved -- hold=apply(test,1,which.max)     hold[apply(test,1,isUnique)==FALSE] <- 'T' Now, all I need to do is figure out how to get <- 'T' from turning everything in the matrix to a string. On 3/17/2019 8:00 PM, Evan Cooch wrote: Got relatively close - below: On 3/17/2019 7:39 PM, Evan Co

Re: [R] looking for 'tied rows' in dataframe

2019-03-18 Thread Evan Cooch
Got relatively close - below: On 3/17/2019 7:39 PM, Evan Cooch wrote: Suppose I have the following sort of structure: test <- matrix(c(2,1,1,2,2,2),3,2,byrow=T) What I need to be able to do is (i) find the maximum value for each row, (ii) find the column containing the max, but (iii) if the m

[R] looking for 'tied rows' in dataframe

2019-03-18 Thread Evan Cooch
Suppose I have the following sort of structure: test <- matrix(c(2,1,1,2,2,2),3,2,byrow=T) What I need to be able to do is (i) find the maximum value for each row, (ii) find the column containing the max, but (iii) if the maximum value is a tie (in this case, all numbers of the row are the sam

Re: [R] looking for formula parser that allows coefficients

2018-08-24 Thread Gabor Grothendieck
The isChar function used in Parse is: isChar <- function(e, ch) identical(e, as.symbol(ch)) On Fri, Aug 24, 2018 at 10:06 PM Gabor Grothendieck wrote: > > Also here is a solution that uses formula processing rather than > string processing. > No packages are used. > > Parse <- function(e) { >

Re: [R] looking for formula parser that allows coefficients

2018-08-24 Thread Gabor Grothendieck
Also here is a solution that uses formula processing rather than string processing. No packages are used. Parse <- function(e) { if (length(e) == 1) { if (is.numeric(e)) return(e) else setNames(1, as.character(e)) } else { if (isChar(e[[1]], "*")) { x1 <- Recall(e[[2]])

Re: [R] looking for formula parser that allows coefficients

2018-08-22 Thread Gabor Grothendieck
Some string manipulation can convert the formula to a named vector such as the one shown at the end of your post. library(gsubfn) # input fo <- y ~ 2 - 1.1 * x1 + x3 - x1:x3 + 0.2 * x2:x2 pat <- "([+-])? *(\\d\\S*)? *\\*? *([[:alpha:]]\\S*)?" ch <- format(fo[[3]]) m <- matrix(strapplyc(ch, pat)[

Re: [R] looking for formula parser that allows coefficients

2018-08-21 Thread Fox, John
lsciences.mcmaster.ca/jfox/ > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Paul > Johnson > Sent: Tuesday, August 21, 2018 6:46 PM > To: R-help > Subject: [R] looking for formula parser that allows coefficients > > Can

[R] looking for formula parser that allows coefficients

2018-08-21 Thread Paul Johnson
Can you point me at any packages that allow users to write a formula with coefficients? I want to write a data simulator that has a matrix X with lots of columns, and then users can generate predictive models by entering a formula that uses some of the variables, allowing interactions, like y ~ 2

Re: [R] Looking for a package to replace xtable

2017-04-22 Thread BR_email
Jeff: It does what I want. Thanks. Bruce Bruce Ratner, Ph.D. The Significant Statistician™ (516) 791-3544 Statistical Predictive Analtyics -- www.DMSTAT1.com Machine-Learning Data Mining and Modeling -- www.GenIQ.net Jeff Newmiller wrote: Response5x <- Response[ rep ( seq_along( Response[[1

Re: [R] Looking for a package to replace xtable

2017-04-22 Thread BR_email
ata/DecileTable.html", : object 'DECILE_TABLE' not found R> Bruce Ratner, Ph.D. The Significant Statistician™ (516) 791-3544 Statistical Predictive Analtyics -- www.DMSTAT1.com Machine-Learning Data Mining and Modeling -- www.GenIQ.net David L Carlson wrote: I've att

Re: [R] Looking for a package to replace xtable

2017-04-22 Thread Jeff Newmiller
TABLE' not found R> R> R> >> print.xtable(DECILE_TABLE, >> type="html",file="C:/R_Data/DecileTable.html", >include.rownames=FALSE) >> Error in print.xtable(DECILE_TABLE, type = "html", file = >> "C:/R_Data/DecileTable.h

Re: [R] Looking for a package to replace xtable

2017-04-22 Thread peter dalgaard
CILE_TABLE, type="html",file="C:/R_Data/DecileTable.html", >> include.rownames=FALSE) Error in print.xtable(DECILE_TABLE, type = "html", >> file = "C:/R_Data/DecileTable.html", : object 'DECILE_TABLE' not found >> >> R> &

Re: [R] Looking for a package to replace xtable

2017-04-22 Thread Spencer Graves
BLE' not found R> Bruce Ratner, Ph.D. The Significant Statistician™ (516) 791-3544 Statistical Predictive Analtyics -- www.DMSTAT1.com Machine-Learning Data Mining and Modeling -- www.GenIQ.net David L Carlson wrote: I've attached a modification of your script file (called

Re: [R] Looking for a package to replace xtable

2017-04-22 Thread BR_email
'DECILE_TABLE' not found R> Bruce Ratner, Ph.D. The Significant Statistician™ (516) 791-3544 Statistical Predictive Analtyics -- www.DMSTAT1.com Machine-Learning Data Mining and Modeling -- www.GenIQ.net David L Carlson wrote: I've attached a modification of your script file

Re: [R] Looking for a package to replace xtable

2017-04-21 Thread BR_email
ant Statistician™ (516) 791-3544 Statistical Predictive Analtyics -- www.DMSTAT1.com Machine-Learning Data Mining and Modeling -- www.GenIQ.net David L Carlson wrote: I've attached a modification of your script file (called .txt so it doesn't get stripped). See if this does what you want

Re: [R] Looking for a package to replace xtable

2017-04-21 Thread David L Carlson
roject.org Subject: Re: [R] Looking for a package to replace xtable David: Correction: I do need a data frame because from the order Response column I create a data frame as per all my calculated columns, yielding the five column decile table. I used your latest corrections but something buggy is

Re: [R] Looking for a package to replace xtable

2017-04-21 Thread Bruce Ratner PhD
random values and then order the >> first by the second. But rbinom() is selecting random values so what is the >> purpose of randomizing random values? If the real data consist of a vector >> of 1's and 0's and those need to be randomized, sample(data) will do it for >

Re: [R] Looking for a package to replace xtable

2017-04-21 Thread Bruce Ratner PhD
e real data consist of a vector of > 1's and 0's and those need to be randomized, sample(data) will do it for you. > > Then those numbers are replicated 10 times. Why not just select 500 values > using rbinom() initially? > > > David C > > > -----Origi

Re: [R] Looking for a package to replace xtable

2017-04-21 Thread David L Carlson
7 1:22 PM To: David L Carlson ; r-help@r-project.org Subject: Re: [R] Looking for a package to replace xtable David: I tried somethings and got a little more working. Now, I am struck at last line provided: "dec_mean<- aggregate(Response ~ decc, dd, mean)" Any help is appreciated. B

Re: [R] Looking for a package to replace xtable

2017-04-21 Thread BR_email
anges and save the file. If you have Microsoft Excel and Word, another fallback solution is to read the .html file into Excel where you have a wide variety of styles. David C -Original Message- From: BR_email [mailto:b...@dmstat1.com] Sent: Thursday, April 20, 2017 4:31 PM To: David L Ca

Re: [R] Looking for a package to replace xtable

2017-04-21 Thread Bert Gunter
pen the .html file into >> a WYSIWIG html editor such as BlueGriffon, make the changes and save the >> file. If you have Microsoft Excel and Word, another fallback solution is to >> read the .html file into Excel where you have a wide variety of styles. >> >> David C &

Re: [R] Looking for a package to replace xtable

2017-04-21 Thread BR_email
017 4:31 PM To: David L Carlson ; r-help@r-project.org Subject: Re: [R] Looking for a package to replace xtable David: All is perfect, almost - after I ran your corrections. Is there a way I can have more control of the column names, i.e., not be restricted to abbreviations headings, and center

Re: [R] Looking for a package to replace xtable

2017-04-21 Thread Bruce Ratner PhD
riginal Message- > From: BR_email [mailto:b...@dmstat1.com] > Sent: Thursday, April 20, 2017 4:31 PM > To: David L Carlson ; r-help@r-project.org > Subject: Re: [R] Looking for a package to replace xtable > > David: > All is perfect, almost - after I ran your corrections. > Is

Re: [R] Looking for a package to replace xtable

2017-04-21 Thread David L Carlson
lto:b...@dmstat1.com] Sent: Thursday, April 20, 2017 4:31 PM To: David L Carlson ; r-help@r-project.org Subject: Re: [R] Looking for a package to replace xtable David: All is perfect, almost - after I ran your corrections. Is there a way I can have more control of the column names, i.e., not be restrict

Re: [R] Looking for a package to replace xtable

2017-04-21 Thread Bruce Ratner PhD
Thanks, Jeff. Bruce __ Bruce Ratner PhD The Significant Statistician™ (516) 791-3544 Statistical Predictive Analytics -- www.DMSTAT1.com Machine-Learning Data Mining -- www.GenIQ.net > On Apr 20, 2017, at 7:15 PM, Jeff Newmiller wrote: > > ReportR package ___

Re: [R] Looking for a package to replace xtable

2017-04-20 Thread Jeff Newmiller
clear where Cum_R and Cum_n are coming from. In >your code cum_R = Cum_R and cum_n = Cum_n so you could also use >> >> Cum_RespRate <- cum_R/cum_n)*100 >> >> - >> David L Carlson >> Department of Anthropology &g

Re: [R] Looking for a package to replace xtable

2017-04-20 Thread BR_email
use Cum_RespRate <- cum_R/cum_n)*100 - David L Carlson Department of Anthropology Texas A&M University College Station, TX 77840-4352 -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of BR_email Sent: Thursday, April 20, 2017 12:10 PM To: r-he

Re: [R] Looking for a package to replace xtable

2017-04-20 Thread Bruce Ratner PhD
arlson > Department of Anthropology > Texas A&M University > College Station, TX 77840-4352 > > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of BR_email > Sent: Thursday, April 20, 2017 12:10 PM > To: r-help@r-project.org &g

Re: [R] Looking for a package to replace xtable

2017-04-20 Thread David L Carlson
l Sent: Thursday, April 20, 2017 12:10 PM To: r-help@r-project.org Subject: [R] Looking for a package to replace xtable R-helper: Below, code for generating a decile table. I am using the xtable package, but it is not quite right for the output. Issue #1. xtable inserts an unwanted column, before the f

Re: [R] Looking for a package to replace xtable

2017-04-20 Thread Bruce Ratner PhD
Duncan: Thanks. I've exhausted my search for a simple table package that also allows for column sums. If you are not familiar with the decile table, you will find it quite embedded with much insight for predominance of virtually any model. Regards, Bruce __ Bruce Ratner PhD The Sig

Re: [R] Looking for a package to replace xtable

2017-04-20 Thread Duncan Murdoch
On 20/04/2017 1:09 PM, BR_email wrote: R-helper: Below, code for generating a decile table. I am using the xtable package, but it is not quite right for the output. Issue #1. xtable inserts an unwanted column, before the first derived column DECILE Issue #2. In the last line "Total" I manually su

[R] Looking for a package to replace xtable

2017-04-20 Thread BR_email
R-helper: Below, code for generating a decile table. I am using the xtable package, but it is not quite right for the output. Issue #1. xtable inserts an unwanted column, before the first derived column DECILE Issue #2. In the last line "Total" I manually sum all columns, even though I only want

Re: [R] Looking for

2017-04-09 Thread Bert Gunter
Details matter! 1. Are the points of discontinuity known? This is critical. 2. Can we assume monotonic increasing, as is shown? -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bl

[R] Looking for

2017-04-09 Thread li li
Dear all, For a piecewise function F similar to the attached graph, I would like to find inf{x| F(x) >=0}. I tried to uniroot. It does not seem to work. Any suggestions? Thank you very much!! Hanna F.pdf Description: Adobe PDF document ___

[R] Looking for a data set - Teratology data of Chen and Kodell (1989)

2016-02-18 Thread Ravi Varadhan
Hi, I am looking for the teratology data set from the Chen and Kodell (JASA 1989) on mice exposed to different doses of a chemical, DEHP. This was also analyzed in a Biometrics 2000 paper by Louise Ryan using GEE. I think this data set is publicly available, but I am unable to locate it. Does

Re: [R] Looking for a more elegant solution than a loop

2015-10-26 Thread William Dunlap
> identical(as.list(x), xz) [1] TRUE Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Oct 26, 2015 at 6:31 PM, Erin Hodgess wrote: > Hello! > > The following (which is a toy example) works fine, but I wonder if there is > a better or more elegant way than to do the loop: > > xz <- vector("l

Re: [R] Looking for a more elegant solution than a loop

2015-10-26 Thread Erin Hodgess
t, > John > > - > John Fox, Professor > McMaster University > Hamilton, Ontario > Canada L8S 4M4 > Web: socserv.mcmaster.ca/jfox > > > > > -Original Message- > > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of

Re: [R] Looking for a more elegant solution than a loop

2015-10-26 Thread Fox, John
t; From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Erin > Hodgess > Sent: October 26, 2015 9:32 PM > To: R help > Subject: [R] Looking for a more elegant solution than a loop > > Hello! > > The following (which is a toy example) works fine, but I wonder if there

[R] Looking for a more elegant solution than a loop

2015-10-26 Thread Erin Hodgess
Hello! The following (which is a toy example) works fine, but I wonder if there is a better or more elegant way than to do the loop: xz <- vector("list",length=4) x <- 6:9 for(i in 1:4)xz[[i]] <- x[i] xz [[1]] [1] 6 [[2]] [1] 7 [[3]] [1] 8 [[4]] [1] 9 This does exactly what I want, but th

Re: [R] Looking for Post-hoc tests (a la TukeyHSD) or interaction-level independent contrasts for survival analysis.

2015-09-16 Thread David Winsemius
On Sep 15, 2015, at 12:09 PM, Huot, Matthieu wrote: > Hi Tom > > I know the post is over 7-8 years old but I am having the same question. How > to do a post-hoc test like TukeyHSD on coxph type output. Create a new variable using the `interaction`-function, apply you contrasts to that object,

Re: [R] Looking for Post-hoc tests (a la TukeyHSD) or interaction-level independent contrasts for survival analysis.

2015-09-15 Thread Huot, Matthieu
Hi Tom I know the post is over 7-8 years old but I am having the same question. How to do a post-hoc test like TukeyHSD on coxph type output. Have you received any info in this matter? Thanks Matthieu Looking for Post-hoc tests (a la TukeyHSD) or interaction-level independent contrasts for sur

Re: [R] Looking for help finding a wrapper/package to use TA-Lib in R

2015-05-23 Thread Claudio Ribeiro
or > something? > John Kane > Kingston ON Canada > > >> -Original Message- >> From: c_c_ribe...@hotmail.com >> Sent: Sat, 23 May 2015 17:13:15 +0200 >> To: r-help@r-project.org >> Subject: [R] Looking for help finding a wrapper/package to use TA-L

Re: [R] Looking for help finding a wrapper/package to use TA-Lib in R

2015-05-23 Thread John Kane
Terribly uninformative web-site but it does give us some idea. Thanks John Kane Kingston ON Canada > -Original Message- > From: c_c_ribe...@hotmail.com > Sent: Sat, 23 May 2015 19:50:26 +0200 > To: jrkrid...@inbox.com > Subject: Re: [R] Looking for help finding a wrapper

Re: [R] Looking for help finding a wrapper/package to use TA-Lib in R

2015-05-23 Thread John Kane
t; To: r-help@r-project.org > Subject: [R] Looking for help finding a wrapper/package to use TA-Lib in > R > > Dear members, > > We all know the power and usefulness of TA-Lib. There is a python wrapper > for it but, despite all my searching, I am unable to find it for R. Do

[R] Looking for help finding a wrapper/package to use TA-Lib in R

2015-05-23 Thread Claudio Ribeiro
Dear members, We all know the power and usefulness of TA-Lib. There is a python wrapper for it but, despite all my searching, I am unable to find it for R. Does anyone know why? I am starting learning and using RStudio and would really like to be able to call the TA-Lib functions from RStudio.

Re: [R] Looking for an R package for Set Cover Problem

2015-01-25 Thread Hans W Borchers
As the Wikipedia page you took your example problem from explains, the sets cover problem can be formulated as an integer linear programming problem. In R, such problems will be solved effectively applying one of the available MILP packages, for example LPsolve or Rsymphony. Kumar Mainali gmail.

[R] Looking for an R package for Set Cover Problem

2015-01-24 Thread Kumar Mainali
I am looking for an R package that solves Set Cover Problem. As Wikipedia explains: Given a set of elements [image: \{1,2,...,m\}] (called the universe) and a set [image: S] of [image: n] sets whose union equals the universe, the set cover problem is to identify the smallest subset of [image: S] w

Re: [R] Looking for Feature Hashing

2014-10-26 Thread Duncan Murdoch
On 25/10/2014, 5:25 AM, Wush Wu wrote: > Dear all, > > Sorry that I am not sure that whether I should ask the question here or > R-devel. Is there any existed packages which implements or is implementing > feature hashing or similar function? > > For who does not know "feature hashing", please le

[R] Looking for Feature Hashing

2014-10-26 Thread Wush Wu
Dear all, Sorry that I am not sure that whether I should ask the question here or R-devel. Is there any existed packages which implements or is implementing feature hashing or similar function? For who does not know "feature hashing", please let me give a brief explanation here. Feature hashing

Re: [R] LOOKING FOR CODE REPOSITORY

2014-03-20 Thread Jeff Newmiller
Although there is a great deal of value to be gained by understanding how "package" code is written, most of my R "projects" consist of a file with 10-100 lines of code working with data in the global environment that call on packages. Such code is not typically posted online. I do find it conv

Re: [R] LOOKING FOR CODE REPOSITORY

2014-03-20 Thread Greg Snow
Please read the posting guide (there is a link at the bottom of every post) and post in plain text, not HTML, and also avoid all caps. The biggest repository of R code is probably CRAN which is linked from the main R page. There are also R-forge and Bioconductor and many R packages on Github. On

[R] LOOKING FOR CODE REPOSITORY

2014-03-20 Thread Subhabrata Banerjee
Dear Group, I am bit new in R. I am looking for a code repository of few projects developed in R. I want to see them to learn more. If any one of the esteemed members of the group may kindly help. Regards, Subhabrata Banerjee. [[alternative HTML version deleted]] __

[R] Looking for consultant in mathematics/ statistics

2013-12-03 Thread Michael Haenlein
Dear all, I am looking for a consultant who can help me to solve a mathematical/ statistical problem I have. The problem is more conceptual in nature (How to solve a given problem analytically) than programming-related. Although I also would need some programming support later, once the analytic s

Re: [R] Looking for package to solve for exponent using newton's method

2013-10-11 Thread Prof J C Nash (U30A)
t 2013 21:03:00 +0200 From: Berend Hasselman To: Ken Takagi Cc:r-h...@stat.math.ethz.ch Subject: Re: [R] Looking for package to solve for exponent using newton'smethod Message-ID: Content-Type: text/plain; charset="us-ascii" On 10-10-2013, at 20:39, Ken Takagi wrote:

Re: [R] Looking for package to solve for exponent using newton's method

2013-10-10 Thread Jeff Newmiller
?uniroot --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engine

Re: [R] Looking for package to solve for exponent using newton's method

2013-10-10 Thread Ken Takagi
Thanks! That's just what I needed. __ 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, reproducibl

Re: [R] Looking for package to solve for exponent using newton's method

2013-10-10 Thread Berend Hasselman
On 10-10-2013, at 20:39, Ken Takagi wrote: > Hi, > I'm looking for an R function/package that will let me solve problems of the > type: > > 13 = 2^x + 3^x. > > The answer to this example is x = 2, but I'm looking for solutions when x > isn't so easily determined. Looking around, it seems that

Re: [R] Looking for package to solve for exponent using newton's method

2013-10-10 Thread Duncan Murdoch
On 10/10/2013 2:39 PM, Ken Takagi wrote: Hi, I'm looking for an R function/package that will let me solve problems of the type: 13 = 2^x + 3^x. The answer to this example is x = 2, but I'm looking for solutions when x isn't so easily determined. Looking around, it seems that there is no algebra

[R] Looking for package to solve for exponent using newton's method

2013-10-10 Thread Ken Takagi
Hi, I'm looking for an R function/package that will let me solve problems of the type: 13 = 2^x + 3^x. The answer to this example is x = 2, but I'm looking for solutions when x isn't so easily determined. Looking around, it seems that there is no algebraic solution for x, unless I'm mistaken. Do

Re: [R] Looking for data sets with unordered failure events of different types

2013-09-14 Thread David Winsemius
On Sep 13, 2013, at 11:59 AM, Ryung Kim wrote: > Dear R community, > > Please let me know if there is an R data set with time to multiple outcomes > (unordered failure events of different types). > > I am specifically looking for non-competing risks so that I can have observed > times for bot

[R] Looking for data sets with unordered failure events of different types

2013-09-13 Thread Ryung Kim
Dear R community, Please let me know if there is an R data set with time to multiple outcomes (unordered failure events of different types). I am specifically looking for non-competing risks so that I can have observed times for both outcomes. Twin data or recurrent data will not work for me b

Re: [R] Looking for knitr example for beginner (NO RStudio)

2013-07-18 Thread Yihui Xie
All your questions are answered by the knitr book in my first reply, which introduces knitr in a systematic manner. For the web pages, I have tried my best, and nobody can make everybody happy. I do not understand why you do not understand Rnw and markdown, and I do not quite believe a person who u

Re: [R] Looking for knitr example for beginner (NO RStudio)

2013-07-18 Thread Yixuan Qiu
Hi Mike, As long as you have access to some user folder, you can download a non-install version of RStudio. Go to the page http://www.rstudio.com/ide/download/desktop and select "Show zip/tarball downloads", download, extract, and run. Do believe Yihui that running an example using RStudio saves yo

Re: [R] Looking for knitr example for beginner (NO RStudio)

2013-07-18 Thread C W
Hi, @Yihui When I am using a public computer, say university computer lab or financial company. I do not have control what to install. I'm also very happy with R editor on OS X, it integrates with Mac well. As for my Mac Air, I am keeping installation to the minimal. There are a lot links on yo

Re: [R] Looking for knitr example for beginner (NO RStudio)

2013-07-18 Thread Simon Zehnder
Hi Mike, if you browse the folders, you find always the Rscript binary (the executable) under /Library/Frameworks/R.framework/Versions/.../Resources/Rscript. Do not forget to give your tex file the extension .Rnw! Then surround each Rcode with <>= Here your r code as you do it in the R shell .

Re: [R] Looking for knitr example for beginner (NO RStudio)

2013-07-18 Thread Yihui Xie
I recommend RStudio not because I want to promote it in any sense, but because of the fact that it has the best support for Rnw/knitr at the moment, and it will save you a lot of headache to get started. It seems you just do not believe me, and insist on going through all the low-level configuratio

Re: [R] Looking for knitr example for beginner (NO RStudio)

2013-07-18 Thread Berend Hasselman
On 18-07-2013, at 22:22, C W wrote: > Thanks, Simon. I would never figured it out! > > I apologize if I sound frustrated, because I am. > > @package author: you have a great package, but I think a lot of the > directions are hand waving. For the newbies, this leads to more > confusion. > >

Re: [R] Looking for knitr example for beginner (NO RStudio)

2013-07-18 Thread C W
Thanks, Simon. I would never figured it out! I apologize if I sound frustrated, because I am. @package author: you have a great package, but I think a lot of the directions are hand waving. For the newbies, this leads to more confusion. @Berend: I am using OS X. Mike On Thu, Jul 18, 2013 at

Re: [R] Looking for knitr example for beginner (NO RStudio)

2013-07-18 Thread Berend Hasselman
On 18-07-2013, at 22:09, C W wrote: > http://tex.stackexchange.com/questions/85154/knitr-with-texworks/85165#85165 > > In step 3: "add the executable file (step 3)". > > What is the executable file? Locate package knitr directory path in R? > >From the window: Executable ==> Program. So th

Re: [R] Looking for knitr example for beginner (NO RStudio)

2013-07-18 Thread Simon Zehnder
The executable is in case of knitr always Rscript. On a mac it is simply Rscript on windows it is Rscript.exe. This should be on your PATH. If you are not sure, open the Mac Terminal and type Rscript --version. If it does not say "Command not found" all is fine. Best Simon On Jul 18, 2013, at

Re: [R] Looking for knitr example for beginner (NO RStudio)

2013-07-18 Thread C W
http://tex.stackexchange.com/questions/85154/knitr-with-texworks/85165#85165 In step 3: "add the executable file (step 3)". What is the executable file? Locate package knitr directory path in R? Mike On Thu, Jul 18, 2013 at 3:56 PM, C W wrote: > Actually, I see it at the bottom. Sorry! > > O

Re: [R] Looking for knitr example for beginner (NO RStudio)

2013-07-18 Thread C W
Actually, I see it at the bottom. Sorry! On Thu, Jul 18, 2013 at 3:44 PM, C W wrote: > Hi Simon, > I am on OS X Lion, I have TeXworks, I don't have knitr as an option. > > How do I install that into TeXworks? Seems like I have to something > in terminal? > > Mike > > On Thu, Jul 18, 2013 at 3:3

Re: [R] Looking for knitr example for beginner (NO RStudio)

2013-07-18 Thread C W
Hi Simon, I am on OS X Lion, I have TeXworks, I don't have knitr as an option. How do I install that into TeXworks? Seems like I have to something in terminal? Mike On Thu, Jul 18, 2013 at 3:31 PM, Simon Zehnder wrote: > Hi Mike, > > I found my way with this little blog: http://yihui.name/knit

Re: [R] Looking for knitr example for beginner (NO RStudio)

2013-07-18 Thread Simon Zehnder
Hi Mike, I found my way with this little blog: http://yihui.name/knitr/demo/editors/ The .Rnw files are created very well in a Latex editor. Everything else can be easily googled. The command via knitr::knit2pdf works very fine if you use the chunks. If you are trying to compile an Rtex file, t

Re: [R] Looking for knitr example for beginner (NO RStudio)

2013-07-18 Thread C W
How do you create a .Rnw file, in R or LaTex? I don't think any tutorial mentions it. btw, I am very new to the terms like markdown, so I don't understand "markdown to HTML". I am reading here http://biostat.mc.vanderbilt.edu/wiki/Main/KnitrHowto that you need to compile at terminal. I do not k

Re: [R] Looking for knitr example for beginner (NO RStudio)

2013-07-18 Thread Yihui Xie
I'm not sure what your question really is. You do not have to use RStudio, but it will be much easier to get started with RStudio, because it does a lot of automatic conversion behind the scenes (e.g. tex to PDF, markdown to HTML, ...). If you want a "pure" solution without any text editor support,

[R] Looking for knitr example for beginner (NO RStudio)

2013-07-18 Thread C W
Hi everyone, I am using package knitr, FIRST TIME. I don't have access to RStudio. Read through Yihui's page, didn't find it helpful. Stuck on terms Rnw, GFM (GitHub Flavored Markdown). Never used Sweave, so the reference is not helping. Is there a simple step-by-step example WITHOUT RStudio?

Re: [R] Looking for a better code for my problem.

2013-04-24 Thread Jorge I Velez
Try subset(Dat, AA == "A" | (AA == "B" & BB == "b")) HTH, Jorge.- On Wed, Apr 24, 2013 at 8:21 PM, Christofer Bogaso < bogaso.christo...@gmail.com> wrote: > Hello again, > > Let say I have following data: > > Dat <- structure(list(AA = structure(c(3L, 1L, 2L, 1L, 2L, 3L, 3L, 2L, > 3L, 1L, 1L,

Re: [R] Looking for a better code for my problem.

2013-04-24 Thread Rui Barradas
Hello, You can easily make of the following a one-liner. Note that the order of rows is not the same as in your code, so identical() will return FALSE. idx <- Dat[, 'AA'] == "A" | (Dat[, 'AA'] == "B" & Dat[, 'BB'] == "b") res2 <- Dat[idx, ] Hope this helps, Rui Barradas Em 24-04-2013 11:2

  1   2   3   4   >