[R] Run Script at Start Up

2009-01-24 Thread glenn
Dear All, A very quick newbie question sorry. I am running R on Windows and would like to know if I can store a .R file in a location that it gets run on start up. Or is there some file I can alter please? Regards Glenn [[alternative HTML version deleted

[R] Cor(df,method = kendall)

2009-01-28 Thread glenn
return immediately ? In particular trying to use function in Excel (reval) and I am getting OLE error boxes as RGUI hangs. Many Thanks. Glenn [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

[R] does R plus 3.3 need vista ?

2009-02-06 Thread glenn
Hi all - has anyone ot and experienced problems with R+. Have downloaded the trail and it will not work -does it need vista (like it says on the box!) Thanks glenn [[alternative HTML version deleted]] __ R-help@r-project.org

[R] as.xts error

2009-02-07 Thread glenn
the data is coming from a spreadsheet via the excel function rputdataframe, and has 3 columns of dates (excel format) regards glenn [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

[R] sapply

2009-02-08 Thread glenn
and quant mod route Regards glenn [[alternative HTML version deleted]] __ 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

Re: [R] sapply

2009-02-08 Thread glenn
Bullseye ! thanks a lot Sundar -Original Message- From: Sundar Dorai-Raj [mailto:sdorai...@gmail.com] Sent: 09 February 2009 00:31 To: glenn Cc: r-help@r-project.org Subject: Re: [R] sapply I'm not sure what you really want, so perhaps a simple example would help (i.e. what a sample

[R] subsets problem

2009-02-08 Thread glenn
in a single column of data. So far so good. How do loop through all values in the uniques list (say there is 50), perform an operationon Test1Test50, and then bolt all the lists together in a single list please ? Regards Glenn [[alternative HTML version deleted

[R] (no subject)

2009-02-09 Thread glenn
25 39 [19] -12 -90 -1 15 -87 30 I can not seem to see what type of object this element is (is.list = FALSE) - also is there a way to take all the elements and just put them in just one series please Regards glenn [[alternative HTML version deleted

[R] standardize

2009-02-09 Thread glenn
Very quick newbie question sorry; How do I standardize a list of data please (other than do the calculation of course). Is there a quick way please ? glenn [[alternative HTML version deleted]] __ R-help@r-project.org

[R] running totals in a list

2009-02-09 Thread glenn
very simple question I am sure sorry: for a list; test -c(1,2,3) how do I total them up please to return the result 1,3,6 Regards Glenn [[alternative HTML version deleted]] __ R-help@r

[R] (no subject)

2009-02-13 Thread glenn
Very quick one please team; How do I return the number of possible unique subsets in a data set (not combinations i.e. not (1,2,3,4) and (4,3,2,1)) please ? e.g. In a list of integers 1 to 12, there is 495 sets with 4 elements in regards glenn [[alternative HTML version

[R] PCA functions

2009-02-13 Thread glenn
Hi All, would appreciate an answer on this if you have a moment; Is there a function (before I try and write it !) that allows the input of a covariance or correlation matrix to calculate PCA, rather than the actual data as in princomp() Regards Glenn [[alternative HTML

[R] Newbie Question: parts of a dataframe

2008-12-30 Thread glenn
for not being a interesting problem ! Glenn [[alternative HTML version deleted]] __ 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

[R] no subject

2009-01-09 Thread glenn
a term (%) that when typed means the last returned value, so% + 1 say would return the last outputted value +1 .is there an R equivalent please? Many thanks glenn [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] Joining lists

2009-01-13 Thread glenn
Very simple one sorry: How do I join 2 lists please Thanks glenn [[alternative HTML version deleted]] __ 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

[R] Removing duplicates from a list

2009-01-14 Thread glenn
For a list say; list1-{1,2,3,4,5,2,1} How do I remove the duplicates please? My real list is 20,000 obs long of dates with many duplicates Regards Glenn [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https

[R] Minimization Problem

2009-01-18 Thread glenn
of this matrix problem; [x1,x2,x3,x4].[ -0.38 -0.52 0.68-0.29 ] [ -0.39 -0.42-0.12 0.49 ] [ -0.40 -0.20-0.45 0.26 ] [ -0.390.03-0.39-0.36 ] I hope the formatting comes out ok , I did this on a Mac ! Glenn

[R] Multiplication of dataframes

2009-01-18 Thread glenn
If I have 2 data frames; df1:dim(df1) = (1,10) df2:dim(df2) = (2000,10) Both with column header names, how do I multiply them together please. I.e create a dateframe dim() = (2000,1) Many Thanks in advance Glenn [[alternative HTML version deleted

[R] Combinations

2009-01-18 Thread glenn
Hi All, some help on this would be appreciated; Understood combinations(7,4) returns all the possible 4 part combinations out of 7. Is is possible to substitute the ³7² for a list of stuff you would like to see the mix of; c(³a²,...,²g²) say ? Thanks Glenn [[alternative HTML version

[R] Month tick marks on a plot()

2009-01-19 Thread glenn
Hi All, I have a small dataframe [dates, values) I am plotting with plot(df,type=²l²) And the date date covers a year. The graph only have marks at Œ2008¹ and Œ2009¹. How do I get the months labeled at the bottom please Thanks as always Glenn [[alternative HTML version deleted

[R] Statistics books

2009-01-20 Thread glenn
Not strictly R sorry Looking for some new books on the topics of; Correlation, and Rank-Reduction in general If anyone has any suggestions I would appreciate it Amazon yielded some books from SAGE publishers which looked ok Regards Glenn [[alternative HTML version deleted

[R] Job for senior quantitative analyst in Dublin

2010-10-20 Thread Treacy, Glenn
Senior Quantitative Research Analyst Based in Irish Life Investment Managers, Lower Beresford Place, Dublin 1 Irish Life Investment Managers (ILIM), the investment management company within the Irish Life Permanent Group manages assets of circa EUR30bn and provides fund management

[R] Conversion of S+ libraries

2010-10-21 Thread Treacy, Glenn
Does anyone have any advice on converting S+ libraries to R packages? Glenn -- ** Irish Life Investment Managers Limited is regulated by the Central Bank of Ireland. Irish Life Investment Managers Limited

[R] test

2010-10-21 Thread Treacy, Glenn
-- ** Irish Life Investment Managers Limited is regulated by the Central Bank of Ireland. Irish Life Investment Managers Limited Registered Office: Beresford Court, Beresford Place, Dublin 1. Registered in

Re: [R] RE : RE : R getting slower until it breaks...

2010-10-08 Thread Glenn Davis
There might be a file handle leak, i.e. files were never closed after being written. The Process Explorer program: http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx can tell you. -- View this message in context:

[R] large integers in R

2010-01-26 Thread Blanford, Glenn
Has there been any update on R's handling large integers greater than 10^9 (between 10^9 and 4x10^9) ? as.integer() in R 2.9.2 lists this as a restriction but doesnt list the actual limit or cause, nor if anyone was looking at fixing it. Glenn D Blanford, PhD mailto:glenn.blanf...@us.army.mil

Re: [R] large integers in R

2010-01-27 Thread Blanford, Glenn
Duncan, thanks. To the point, R supports -(2**31-1) to 2**31-1 or -2147483647 to +2147483647 -2147483648 is a valid signed integer but returns NA. Signed integers are -2147483648 to 2147483647 Glenn D Blanford, PhD NAIL lab, PM NSI, Fort Monmouth, NJ glenn.blanf...@us.army.mil Scientific Research

[R] Significance of confidence intervals in the Non-Linear Least Squares Program.

2008-03-26 Thread glenn andrews
because of the ill-conditioned covariance matrix? Glenn __ 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

[R] [Re: Significance of confidence intervals in the Non-Linear Least Squares Program.]

2008-03-27 Thread glenn andrews
0.337570.13480 2.504 0.0189 * d -2.941652.25287 -1.306 0.2031 Glenn Prof Brian Ripley wrote: On Wed, 26 Mar 2008, glenn andrews wrote: I am using the non-linear least squares routine in R -- nls. I have a dataset where the nls routine outputs tight confidence intervals

[R] [Re: Significance of confidence intervals in the Non-Linear Least Squares Program.]

2008-03-27 Thread glenn andrews
What should I be looking for in the output of the nls() routine that alerts me to the fact that the Hessian is potentially ill-conditioned? Glenn Peter Dalgaard wrote: glenn andrews wrote: Thanks for the response. I was not very clear in my original request. What I am asking

[R] Singular Gradient in nls

2008-03-28 Thread glenn andrews
for determining singularity? // //Glenn // / / / What does the error 'singular gradient' mean during a nonlinear regression? / The gradient matrix to which the message refers is the derivative of the vector of predicted values with respect to the vector of parameters at the current parameter estimates

[R] Odd behavior in histogram breaks?

2008-08-27 Thread Glenn Lawyer
) [1] 201 foo - hist(runif(10),breaks=250) length(foo$breaks) [1] 201 Why only 201 breaks? Where did the other 50 go? -- Here miracles become marvels, and marvels recurring wonders. -- William Beebe Dr. Glenn Lawyer +352 661 967 244 Instituttgruppe

[R] External signal in ODE written in C (using deSolve and approx1?)

2009-06-12 Thread Glenn Woodart
Glenn [[alternative HTML version deleted]] __ 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

Re: [R] External signal in ODE written in C (using deSolve and approx1?)

2009-06-13 Thread Glenn Woodart
to get a working example in the vignette it would be great. Again, thank you for your brilliant work on implementing solvers for differential equations in R. Best wishes Glenn 2009/6/13 Thomas Petzoldt t...@simecol.de Glenn Woodart wrote: Dear list The deSolve package allows you to specify

[R] Rookie nls question

2008-12-15 Thread glenn roberts
on this would great. Apologies again for what I am sure is a simple question. Glenn [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

[R] Applying a function to a dataframe

2008-12-16 Thread glenn roberts
stuff that the by() function refers to. For a simple function x+y I know in Mathematica it would be this; Table[df[[i,1]]+ df[[i,2]],{i,1,10}] Of if the function was defined is would read; Table[f[df[[i,1]], df[[i,2]]],{i,1,10}] Thanks for help in advance Glenn [[alternative HTML

[R] Newbie if problem

2008-12-17 Thread glenn roberts
the if statements wrong ­ just checking there is not some trick you have to use when using apply with functions with if statements in. The function works fine in isolation with df[1,.] say Thanks Glenn [[alternative HTML version deleted]] __ R-help@r

Re: [R] Error in mvpart example

2010-02-27 Thread Glenn De'ath
Thanks for the info -- I'll check it out ASAP. Regards Glenn +++ Glenn De'ath Principal Research Scientist Australian Institute of Marine Science Ph: +61-7-4758-1747; +61-7-4753-4314 In a world without walls and fences, who needs windows and gates

[R] positioning of R windows

2013-02-27 Thread Glenn Stauffer
to jump up one folder, etc. Is there any way to make this the default behavior? I am using R 2.15.1 Thanks, Glenn Stauffer [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] positioning of R windows

2013-02-28 Thread Glenn Stauffer
. No luck though on getting the change directory dialog box to begin at the current working directory the same manner as 'save' or 'open' dialog boxes. I'll update to the new R version Thanks, Glenn Stauffer -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r

Re: [R] positioning of R windows

2013-03-05 Thread Glenn Stauffer
folder for a split second before reverting back to the folder Computer. But the tree always just selects Computer and below that lists the C drive and the D drive. Anyway, I am convinced now that it is not an R issue, but rather something about my computer, specifically. Glenn Stauffer

Re: [R] positioning of R windows

2013-03-05 Thread Glenn Stauffer
I'm sorry - yes I meant 2.15.3. But I think it probably does not matter. Others are not seeing the behavior that I am (with any version), so I don't think R is the problem. But I will post if I ever get it figured out. Thanks, Glenn Stauffer -Original Message- From: Duncan Murdoch

[R] need some help with this example

2013-10-28 Thread Glenn Schultz
I have a class Details that contains information needed by FirstSet to do some calculations then a super class that returns Details and FirstSet.  The problem seems to be in FirstSet where I use the function getAnumber(id).   setClass(Details,          representation(            ID =

[R] Grouped data objects within GLS and Variogram

2012-11-24 Thread Matlack, Glenn
on this! Many thanks, Glenn Matlack Athens, Ohio [[alternative HTML version deleted]] __ 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

Re: [R] positioning of R windows

2013-04-18 Thread Glenn Stauffer
Computer). But when the working directory is outside this user account, then the directory tree behaves normally. -Original Message- From: Glenn Stauffer [mailto:gestauf...@gmail.com] Sent: Tuesday, March 05, 2013 11:11 AM To: 'Duncan Murdoch' Cc: 'Prof Brian Ripley'; r-help@r-project.org

[R] optimx

2014-11-29 Thread Glenn Schultz
= CIR.Mat.Matrix) close(CalCIR1) return(fit) Thank-you in advance, Glenn [[alternative HTML version deleted]] __ 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

[R] cyclic dependency when building a package

2014-11-30 Thread Glenn Schultz
. https://github.com/glennmschultz/BondLab.git I have been trying to figure this out for a couple of months to no avail. If anyone has familiarity with this issue I would certainly appreciate any help with the issue. Thanks, Glenn __ R-help@r

[R] Package build help

2015-02-08 Thread Glenn Schultz
be a handled by the namespace? Thanks, Glenn Found the following significant warnings:   Warning: replacing previous import by ‘lubridate::duration’ when loading ‘BondLab’   Warning: replacing previous import by ‘plyr::here’ when loading ‘BondLab’ __ R-help@r

[R] Package Build Suggestions

2015-01-24 Thread Glenn Schultz
Regards, Glenn __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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

[R] BondLab Package

2015-02-14 Thread Glenn Schultz
Type: Package Title: A package for the analysis of structured products Version: 0.0.0 Date: 2013-12-08 Author: Glenn Schultz, CFA Maintainer: Glenn Schultz glennmschu...@me.com Description: The package provides a suite of software utilities for the analysis of Mortgage and Asset Backed securities

[R] ggplot2 recycle color palette

2015-03-17 Thread Glenn Schultz
, Glenn cbbPalette - c(#E69F00,                  #56B4E9,                  #009E73,                  #F0E442,                  #0072B2,                  #D55E00,                  #CC79A7,                  #00) __ R-help@r-project.org mailing list

[R] Package build help - thanks

2015-03-22 Thread Glenn Schultz
the examples to the appropriate folder?  For example, could I create a folder data and then move each of the below folders to data and on install move the data folders to say a bondlabdata folder? Best Regards, Glenn Non Standard Folders are below BondData - bond objects (S4) identified by cusip

[R] ggplot2 help

2015-03-15 Thread Glenn Schultz
All,  I am doing something wrong but I don't see what.  When I plot in ggplot all the lines are on top of one another but the data is not.  Any help is appreciated. Thanks, Glenn  # I use this function to generate data Burnout - function(beta1 = numeric

[R] vectorize data string analysis

2015-03-02 Thread Glenn Schultz
this using the function I have written.  Can this be vectorized or is this a loop deal? Best Regards, Glenn   #' FNMA Factor   #'    #' This function parses the FNMA factor file for load into   #' into a database table the FNMA factor file is non-delimited   #' @param filepath A character vector

[R] Lubridate and NameSpace

2015-02-28 Thread Glenn Schultz
lubridate:::%m+% within my function based on some discussion I found online.  This is likely the correct idea but I don't think I am calling the function correctly since it does not work in the code when I use the above syntax. Any suggestions are appreciated Best Glenn  The description file

[R] bigglm connected to a database

2015-03-03 Thread Glenn Schultz
are appreciated. Best Regards, Glenn make.data - function(connection, query, chunksize,...){       function(reset = FALSE) {       if (reset) {         if (got 0) {             dbClearResult(result)             result - dbSendQuery(Train.Data, ModelData)             got - 0         }         return

[R] Package Build Recommendations

2015-05-06 Thread Glenn Schultz
and REMICs (CMOs).   They referenced via connection in the software via a connection string ~/users/BondLab.  I am looking for recommendations to create the directory and copy the appropriate folders with their data to a user directory on install.   Any help will be appreciated. Glenn   BondData Groups

[R] Code works on Mac but not Windows

2015-05-10 Thread Glenn Schultz
errors no method.  I have to pass a method = ns in the function.  If I pass the value for method to the function it will run with no error.  Any thoughts are appreciated. Best Regards, Glenn   #Default method for TermStructure   if(missing(method)) method = ns

[R] Package Build question for Bond Lab

2015-05-09 Thread Glenn Schultz
issue I need to resolve for BondLab.  I read the writing packages section on 1.5.3 on loan hooks but it really does not address this question. Best Regards, Glenn __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch

Re: [R] Code works on Mac but not Windows

2015-05-11 Thread Glenn Schultz
thierry.onkel...@inbo.be wrote: Dear Glenn, We need more details on the function. Please provide a commented, minimal, self-contained version of the function that reproduces the problem (as the posting guide asks you to do).  Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek

[R] Illustrating use of R package

2015-05-16 Thread Glenn Schultz
actually have to buy a windows machine to build the windows binary for CRAN? Glenn   __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

[R] Building Package Help Files

2015-04-04 Thread Glenn Schultz
to organize the help files under titles as follows: Passthrough Analysis - REMIC Analysis and Structuring - Prepayment Model - Is a scheme like this possible?  If so, how would I go about accomplishing this? Best Regards, Glenn __ R-help@r-project.org

[R] spline basis

2015-06-22 Thread Glenn Schultz
I have the following code which creates a spline function x - c(1, 12, 24, 36, 60, 120, 200, 240, 300, 360) y - c(.2, 8, 8, 8, 8, 8, 8, 8, 18, 50) Baseline - cbind(x,y) Turnover - splinefun(Baseline[,1], Baseline[,2], method = natural) plot(Turnover(seq(1, 360, 1)), type = l) If I change the

[R] ggplot stat_bin question

2015-06-02 Thread Glenn Schultz
this. Below is the code I used to create the graph.  I think I am pretty much following the examples in Hadley's ggplot2 book and really just need to eliminate the message as the graphs look fine.  Any suggestions are appreciated. Best Regards, Glenn    Mdur.dist - ggplot(OAS.Mdur, aes(x = value

[R] Viewport help

2015-05-24 Thread Glenn Schultz
a little lost on the viewport and can't quite get to the last step.  The function is below and the code I have question about is in red. Glenn The function is below - The code I have a question about is in red #' OAS Analaysis of Pass Though MBS #'  #' Function calls BondLab PassThroughOAS

[R] data for pass though OAS viewport question

2015-05-25 Thread Glenn Schultz
Attached is dput of the pass through OAS  __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

[R] R CMD methods and ggplot2 advice

2015-05-25 Thread Glenn Schultz
point in the right direction to resolve these I would appreciate the advice.  These are my last remaining two issues to make the packages pass CRAN aside from the on.load() Best Regards, Glenn * checking dependencies in R code ... NOTE package ‘methods’ is used but not declared * checking R

[R] Roxygen Documentation

2015-05-22 Thread Glenn Schultz
to seek an alternative. Thanks, Glenn #' Chapter 1 Present Value Function Example #'  #' The script example calls the presesnt value function #' from the package BondLab #' @examples #' \dontrun{ require(BondLab) PV = TimeValue(interest.rate = .05,                number.periods = 3

[R] Vignette using knitr, devtools, and R markdown

2015-07-29 Thread Glenn Schultz
- maybe doing something wrong.  Does anyone know if I can create a TOC in a vignette using r-markdown and devtools? Glenn   __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] Knit R and Book Publishing

2015-08-05 Thread Glenn Schultz
-Securities-Website/dp/1118944003/ref=sr_1_1?ie=UTF8qid=1438822386sr=8-1keywords=glenn+m+schultz During the learning process I came to know literate programming and reproducible research.  Now,  I have a viable package and I would like re-write the book in R Studio with knitr.  I have had some success

[R] Parallel Processing

2015-08-13 Thread Glenn Schultz
' must be a character string or a function  I have read some posts on the internet suggesting the issue may be related to S4 class and I have tried parse() to no avail.  I have read Snow and Parallel documentation but I am not getting the issue. Glenn   library(parallel) library(foreach) library

[R] ggplot percent format for interest rates

2015-07-25 Thread Glenn Schultz
Hello All, The data is as follows below with ggplot command.  I would like there to be two digits to the right of the decimal on the y axis - this would be consistent with plotting interest rates.  I have not had much luck.  Any ideas are appreciated -glenn structure(list(Tenor = c(0, 1, 2

[R] Advice collating an R package

2015-11-11 Thread Glenn Schultz
Thanks, Glenn __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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

[R] Creating S4 class with a slot as an array

2015-10-20 Thread Glenn Schultz
= "CashFlow", function(.Object, CashFlowArray = "array" ){ .Object@CashFlowArray return(.Object) callNextMethod(.Object,...) }) CashFlow <-function(CashFlowArray = array()){ new("CashFlow", CashFlowArray = CashFlowArray) } CFTest <- array(data = 2,

[R] Extracting XML value

2015-09-03 Thread Glenn Schultz
rsed the xml doc = xmlTreeParse(USSW10, asText = TRUE, useInternal = TRUE) which gives   finally I try to extract the value 0.46 using the xmlValue function.  I have lost something in translation and I am unable to extract the value.  my understanding is I have one

[R] R studio and git

2015-09-26 Thread Glenn Schultz
on the update of OSX. Any ideas? Glenn __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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

Re: [R] extracting a value from XML

2015-09-21 Thread Glenn Schultz
Hi Bob, Thanks, can you help me undestand why it starts with //observation and how you know that it is a node? Glenn On Sep 21, 2015, at 01:56 PM, boB Rudis <b...@rudis.net> wrote: This is how (one way) in both the xml2 package and XML package: library(xml2) library(XML) txt <- '

[R] extracting a value from XML

2015-09-21 Thread Glenn Schultz
value]]") but no success.  All I need is the 0.46 value.  Any suggestions to help me along are greatly appreciated. Glenn     __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEA

[R] help using SED

2015-12-05 Thread Glenn Schultz
ed to determine that the problem is the missing quotes but I do not know how to get those included in the below R command. Any help is appreciated Glenn __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailma

[R] S4 Class to Array

2015-12-16 Thread Glenn Schultz
insights/help are appreciated, - Glenn setClass("AnObject", representation( dataone = "numeric", datatwo = "numeric")) FillObject <- function(){ one <- rep(10, 20) two <- rep(10,20) new("AnObject", dataone = one, datatwo = two) } MyObject <- FillO

[R] Some help understanding ggplot2

2015-11-28 Thread Glenn Schultz
%.  I think the problem has to do with normalizing the data. Glenn Here is my data structure(list(Rate = c(0.004975, 0.0126625, 0.0180375, 0.0136, 0.016, 0.0196, 0.023, 0.0256, 0.0293, 0.0324, 0.0338), Maturity = c(0.0833, 0.25, 0.5, 1, 2, 3, 4, 5, 7, 10, 30)), .Names = c("Rate",

[R] API key at start-up

2016-06-27 Thread Glenn Schultz
All, Is there a way to assign an API key to a value FREDAPI which is loaded and available once a R session is has started? Glenn __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

[R] Big Finance and digits

2016-02-02 Thread Glenn Schultz
lose the decimal unless I set options(digits = 22).  Are there any other options available.  I have searched the internet and well as some R sites and it seems this maybe my only option. Glenn  __ R-help@r-project.org mailing list -- To UNSUBSCRIBE

[R] String Matching

2016-01-29 Thread Glenn Schultz
found MBS_Test <- function(MBS.id = "character"){ MBS <- glob2rx(paste(MBS.id, ".*", "//.rds", sep = ""), trim.tail = TRUE) MBS.Conn <- gzfile(description = paste(system.file(package = "BondLab"), "/BondData/", MBS, s

[R] Find the first occurrence in a list

2016-03-14 Thread Glenn Schultz
? Glenn data <- as.list(c(rep(0, 20), rep(1, 340))) f <- function(x){x != 0} which(sapply(data, f ) == TRUE)[1] [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.e

[R] R Listen to a Web GUI

2016-08-10 Thread Glenn Schultz
All, I need to create a function that listens to a web GUI interface and then responds by running the needed R function. How can I do that with R? Can anyone recommend what packages I should consider. Glenn __ R-help@r-project.org mailing list

[R] need some help with date

2016-08-14 Thread Glenn Schultz
ons. Any suggestions would be greatly appreciated. Best, Glenn DateCentury <- function(Date = "character"){ ThisDate = as.Date(Date, format = "%m/%d/%y", origin = "1900-01-01") CurrDate = as.Date(Sys.Date()) Century = as.Date("1999-12-31&qu

[R] open a zip file

2016-08-07 Thread Glenn Schultz
t;"), overwrite = FALSE), httr::progress()) httr::http_status(response) } Which results in a zip file but I cannot open the file with unzip or any other R functions what have I done wrong? Glenn __ R-help@r-project.org mailing list -- To UNSUBS

[R] Zip Files

2017-01-20 Thread Glenn Schultz
does anyone have an idea as to the possible cause of this behavior? Best Regards, Glenn __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

[R] help with grep list files

2017-02-20 Thread Glenn Schultz
list.files(path = readpath, pattern = "^lld[A-Z0-9].dat$”) but nothing is returned below is a dput from the first command. $ is an end of line anchor correct? What am I doing wrong? Best, Glenn c("lld022017_AB7755_AS0038.dat", "lld022017_AS0039_AS5210.dat", "lld022017

[R] help using tryCatch

2017-01-19 Thread Glenn Schultz
.  Any help is appreciated Glenn FindATOMSPrice <- function(StartPrice, TBAPrice, PriceInterval, CurrFactor, PrevFactor, CarryAdj, PDReturn, CPNReturn, MTDReturn){ ATOMSReturn <- function(ClosePrice, StartPrice, CurrFactor, PrevFactor, PDReturn, CPNReturn, MTDReturn){ SurvivalFactor = Curr

[R] using a regular expression

2016-09-11 Thread Glenn Schultz
the same strategy to eliminate the spaces and sed command works in a shell but does not work in the R function.  What am I doing wrong?  I have dput - some of the nastier lines with hex 20 characters below my code. Any advice is appreciated. Glenn arm <- function(filepath){ callpath <-

[R] parsing a complex file

2016-08-27 Thread Glenn Schultz
der which begins with 1 at byte location 1 to a file and the detail which begins with 2 at byte location 1 to another file.  When I look at data2 in RStudio  I see the following.  The file is 185 meg, I have the lines but I am stuck as to the next step.  Any ideas are appreciated. Gle

[R] using grepl in dplyr

2016-11-29 Thread Glenn Schultz
UE/FALSE then filter on TRUE Any Ideas are appreciated, Glenn __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html a

[R] getting data from a webpage

2016-12-19 Thread Glenn Schultz
which really has the data. Best, Glenn library(httr) #get initial cookies h <- handle("https://www.theice.com/;) GET(handle = h) POST(url = "https://www.theice.com/marketdata/reports/180;, body = list(reportDate = "15-Dec-2016", SeriesNameAnRunCode_chosen = "USD R

[R] modifying list in loop

2017-04-01 Thread Glenn Schultz
function to update the values in the list.  The function works properly but the list values are not updated.  Any help is appreciated. Best, Glenn BeginBal <- function(deal,period){ numtranches = length(deal) tranches = seq(numtranches,1,-1) for(tranche in seq_along(tranches)){ cashflow <

[R] get the value of a biplane

2017-05-28 Thread Glenn Schultz
new basis is returned and I would like to get the value.   Nothing has worked so far and ?predict plus examples only show prediction from linear models.  Is there a way to extract the value from a defined spline? Best Regards, Glenn __ R-help@r-project.org mai

[R] S4 class slot type S4 class

2018-05-20 Thread Glenn Schultz
',                   slots = (foo1, foo2)) Without a type I believe each slot is .Data.  A get method on the above class slots would return say foo1 which will have all methods and generics belonging to foo1 class.  Is this the correct approach? Best, Glenn __ R-help@r

[R] package colorspace and .WhitePoint question

2018-06-04 Thread Glenn Davis
= XYZ(95,100,105) assign( ".WhitePoint", XYZ(95,100,105), env=as.environment('package: colorspace') ) but all fail, for different reasons. How can I transform XYZ to LAB using a whitepoint different than D65 ? Thanks, Glenn Davis gda...@gluonics.com [[alternative HTML vers

Re: [R] splitting a column of data into multiple columns

2019-07-01 Thread Glenn Doherty
A very elegant solution Jim. Here is a tidyverse solution. Janet, this is a different sample set (the same you sent in another post a couple days ago), but it will work with this data frame as well. ### RECREATING YOUR DATA FRAME scen<-c("1","1","2","2","3","3")

  1   2   >