[R] rpanel rp.tkrplot: xy when using layout

2011-02-24 Thread Philip Wilson
match. For example in the following code the (0,0) and (1,1) corners of the bottom left plot are given as approx (-.1,-.05) and (.23,.45). Thanks for any help, Philip Wilson library(rpanel) panel-rp.control() plots-function(panel) { par(mar=rep(1.5,4)) layout(rbind(1:3,4:6)) for (i in 1:6

[R] HMM Package parameter estimation

2013-04-15 Thread Richard Philip
Hi, I am having difficulties estimating the parameters of a HMM using the HMM package. I have simulated a sequence of observations from a known HMM. When I estimate the parameters of a HMM using these simulated observations the parameters are not at all close to the known ones. I realise the

[R] Using R for modelling Australian Senate Election in NSW?

2014-09-30 Thread Philip Rhoades
. -- Philip Rhoades GPO Box 3411 Sydney NSW 2001 Australia E-mail: p...@pricom.com.au __ 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] TSLS / 2SLS with a binary outcome

2014-11-30 Thread Philip Robinson
outcome. If someone could knows of a package or function and could help by pointing me in the right direction I would be most grateful. Kind regards Philip [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https

[R] A Neural Network question

2016-04-18 Thread Philip Rhoades
to get this last bit of the spreadsheet working so I can move on to doing actual work with the R packages with better understanding? Thanks, Phil. -- Philip Rhoades PO Box 896 Cowra NSW 2794 Australia E-mail: p...@pricom.com.au __ R-help@r

[R] Question regarding Naive Bayes

2016-11-30 Thread PHILIP GLADWIN
Hello,   I am working with the naïve bayes function inlibrary(e1071).   The function calls are: transactions.train.nb = naiveBayes(as.factor(DealerID) ~    as.factor(Manufacturer)     + as.factor(RangeDesc)    

[R] rdb and rds files include abolute file paths / help understanding how lazy-load dbs are created

2017-04-11 Thread Philip Rinn
by pointing me to some docs or by briefly describing the path? Any help/comments are very welcome. Best, Philip PS: could you CC me, I'm not on the list. Thanks. [1] at least in /R/.rdb and /help/.rdb [2] at least in /help/paths.rds [3] https://reproducible-builds.org

Re: [R] rdb and rds files include abolute file paths / help understanding how lazy-load dbs are created

2017-04-20 Thread Philip Rinn
the lack of > response may have been self-inflicted. Ok, let's give you an example: philip@debian:~$ wget https://cran.r-project.org/src/contrib/ald_1.1.tar.gz philip@debian:~$ mkdir test philip@debian:~$ mkdir test1 philip@debian:~$ cp ald_1.1.tar.gz test/ philip@debian:~$ cp ald_1.1.tar.gz test1/ p

Re: [R] rdb and rds files include abolute file paths / help understanding how lazy-load dbs are created

2017-04-20 Thread Philip Rinn
e is to replace those absolute paths by relative[3] paths. But to do so I need to understand where exactly those absolute paths are injected in the files - that's why I asked for help in my fist mail - sorry for not being clear enough. Best, Philip [1] https://stat.ethz.ch/pipermail/r-devel/20

[R] [R-pkgs] New Package pgsc

2018-11-09 Thread Philip Barrett
reatment effects. The vignette can be found at < https://cran.r-project.org/web/packages/pgsc/vignettes/pgsc_vignette.pdf>. Suggestions and comments much appreciated, Philip Barrett Email: pobarrett at gmail dot com Github: https://github.com/philipbarrett/pgsc [[alternativ

Re: [R] A general question about using Bayes' Theorem for calculating the probability of The End of Human Technological Civilisation

2019-03-20 Thread Philip Rhoades
be immediately posting at CrossValidated.com (i.e., stats.stackexchange.com) Thanks - I will check that out . . P. -- David. On March 19, 2019 10:42:24 AM PDT, Philip Rhoades wrote: People, I have only a general statistics understanding and have never actually used Bayes' Theorem

[R] A general question about using Bayes' Theorem for calculating the probability of The End of Human Technological Civilisation

2019-03-19 Thread Philip Rhoades
the prior gets small enough people won't bother with the calculations anyway . . Does anyone know of any existing work on this topic? I want to write a plain-English doc about it but I want to have the stats clear in my head . . Thanks, Phil. -- Philip Rhoades PO Box 896 Cowra NSW 2794

[R] Intended use-case for data.matrix

2020-11-04 Thread Philip Charles
d r-devel archives and couldn't spot any discussion of this, so apologies if this has been asked before. I'm also pretty sure my misunderstanding is with the intended use-case of data.matrix and R ethos around strings/factors rather than the rationale for the change, which is why I'm asking he

Re: [R] Intended use-case for data.matrix

2020-11-04 Thread Philip Charles
against R-devel, but why make your life more difficult by *not* putting it in a package?) Duncan Murdoch On 04/11/2020 6:48 a.m., Philip Charles wrote: > Hi R gurus, > > We do a lot of work with biological -omics datasets (genomics, proteomics > etc). The text file inputs to R

Re: [R] Date read correctly from CSV, then reformatted incorrectly by R

2021-11-20 Thread Philip Monk
like: > > > > > >x <- c("28/10/2016", "19/11/2016", "31/12/2016", "16/01/2016", "05/03/2017") > >as.Date(x, format = "%d/%m/%Y") > > > > > >which produces this output: > > > &

Re: [R] Date read correctly from CSV, then reformatted incorrectly by R

2021-11-20 Thread Philip Monk
t people keep coming along > and sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > On Sat, Nov 20, 2021 at 12:23 PM Philip Monk wrote: > > > > Thanks, Andrew. I didn't realise as.Date *only* read two formats,

[R] Date read correctly from CSV, then reformatted incorrectly by R

2021-11-20 Thread Philip Monk
tions/hints/solutions would be most welcome. :) Thanks for your time, Philip Part-time PhD Student (Environmental Science) Lancaster University, UK. ~ I asked a question a few weeks ago and put together the answer I needed from the responses but didn't know how to say thanks on t

Re: [R] Date read correctly from CSV, then reformatted incorrectly by R

2021-11-20 Thread Philip Monk
1/12/2016", "16/01/2016", "05/03/2017") > > as.Date(x, format = "%d/%m/%Y") > [1] "2016-10-28" "2016-11-19" "2016-12-31" "2016-01-16" "2017-03-05" > > > > > much better than before! I hope

Re: [R] Date read correctly from CSV, then reformatted incorrectly by R

2021-11-20 Thread Philip Monk
Thanks Eric & Jeff. I'll certainly read up on lubridate, and the posting guide (again) (this should be in plain text). CSV extract below... Philip Buffer28/10/201619/11/201631/12/201616/01/201705/03/2017 1002.437110889-8.696748953.2392998162.44318

Re: [R] Syntax help for 'Pivot_longer'

2021-11-28 Thread Philip Monk
, but I don't understand the required syntax. Thanks for your help, Philip rm(list=ls()) library(ggplot2) library(ggpubr) library(tidyverse) library(rstatix) library(ez) library(dplyr) data_long <- structure( list( Buffer = c( "100", "200",

[R] Syntax help for 'Pivot_longer'

2021-11-28 Thread Philip Monk
nnot work out how to pivot this into the long format I need - the documentation doesn't provide enough syntax examples for me to work it out (I've not long been using 'R'). How do I mutate this to provide the additional columns in the long table for the weather variables? Thanks for your time, Philip Part-time

Re: [R] Syntax help for 'Pivot_longer'

2021-11-29 Thread Philip Monk
Apologies, all. No offence was intended. I'll go away and do a lot more reading and thinking then come back with a clearly articulated query if and when that is appropriate. I'm out of time this week, so it won't be for some time. Thank you all for the helpful replies. Best wishes, Philip

[R] Dates as headers causing confusion but needed to convert to Julian days for ANOVA

2021-10-25 Thread Philip Monk
/ 12 levels "January","February",..: 1 1 1 1 1 1 1 1 1 1 ... $ LST : num NA 0.803 0.803 1.044 0.475 ... Suggestions/hints/solutions would be most welcome. :) Thanks for your time, Philip Part-time PhD Student (Environmental Science) Lancaster University, UK. [[alter

[R] ordering of additional columns in forest plot in meta package

2010-01-10 Thread Philip de Witt Hamer
with an omitted indexing command in the forest function. Your input in kindly appreciated. Philip de Witt Hamer, MD PhD VU medical center dept neurosurgery PO Box 7057 1007 MB Amsterdam The Netherlands __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] Find multiple elements in a vector

2009-07-23 Thread Philip Twumasi-Ankrah
This should work which((x==2)|(x==3)) --Quotable Quotes- A Smile costs Nothing But Rewards Everything   - Anonymous Happiness is not perfected until it is shared  

Re: [R] asscii2netcdf]

2008-09-05 Thread Philip Twumasi-Ankrah
Hi Marshall, This link provides very good directions and examples you can use. http://www.image.ucar.edu/GSP/Software/Netcdf/ A Smile costs Nothing  But Rewards Everything Happiness is not perfected until it is shared   -Jane

Re: [R] odds ratio: how to create reference

2008-09-23 Thread Philip Twumasi-Ankrah
To select another reference level from the default that R chooses you can use the relevel function example; Reorder Levels of Factorwarpbreaks$tension - relevel(warpbreaks$tension, ref=M) summary(lm(breaks ~ wool + tension, data=warpbreaks)) function findlink(pkg, fn) { var Y, link; Y =

[R] howto convert matrix of numeric values to Date class?

2008-09-26 Thread Philip James Smith
Hi: I have a matrix, named mat, of numeric values that are in days since Jan 1, 1960. I want to convert them Date class values so that I can do things like seq( value , len=10, by=1 week) where value is any of the matrix elements. How do I do this? Please reply to: [EMAIL PROTECTED]

[R] R alternative to SAS PROC REPORT

2008-06-25 Thread Philip Twumasi-Ankrah
R has wonderful graphics but I am wondering whether there is anything in R to provide customization of tables like PROC Report does in SAS. A Smile costs Nothing  But Rewards Everything Happiness is not perfected until it is shared   

Re: [R] Change name of a specific column of a data frame

2008-07-01 Thread Philip Twumasi-Ankrah
Try require(gregmisc) rename(data, from=old_name, to=new_name) A Smile costs Nothing  But Rewards Everything Happiness is not perfected until it is shared   -Jane Porter   --- On Tue, 7/1/08, [EMAIL PROTECTED] [EMAIL

[R] how do I read only specific columns using read.csv or other read function

2008-07-02 Thread Philip James Smith
Hi R people: I have huge files with as many as 5000 columns. I'd really like to read only certain columns of those files. I know column names I want to read. I looked at the documentation of read.csv . Although there is a col.names option, it allows users to specify the names of the columns,

[R] How do I paste double quotes arround a character string?

2008-07-02 Thread Philip James Smith
Hi R Community: I've got a character string that looks like: New Mexico How to I create the new character string that looks like: New Mexico That is, it is the original string (New Mexico) with double quotes infront and behind it? Thanks, Phil Smith

Re: [R] How do I paste double quotes arround a character string?

2008-07-03 Thread Philip James Smith
be grateful if you can provide a solution to this!! Thank you, Ted! Gratefully, Phil Smith Duluth, GA (Ted Harding) wrote: On 03-Jul-08 01:25:55, Philip James Smith wrote: Hi R Community: I've got a character string that looks like: New Mexico How to I create the new character string

Re: [R] How do I paste double quotes arround a character string?

2008-07-03 Thread Philip James Smith
Philip, I think a bit more clarification may be useful yet! 1: How are you sending the command from R to Linux? 2: What is the command intended to be (as seen by Linux)? And from what source (quasi-command line; script file; ...) would it be read by Linux? For example, on my Linux machine, I

[R] correction to small typo: How do I paste double quotes arround a character string?

2008-07-03 Thread Philip James Smith
Hi all: I made a few typos. Here are the corrections... unix.cmd-paste( cut -d, -f , col.pos , , fn , sep = '' )# comma (,) inserted Sorry... Best regards, Phil Philip James Smith wrote: He Ted: My command will look like: gnu.dat - read.csv( pipe( cut -d

Re: [R] How do I paste double quotes arround a character string?

2008-07-03 Thread Philip James Smith
R Community: At the risk of getting my hands slapped by posting too much on the forum, I've described the strategy for reading only certain portions of huge .csv files below. I think that this very well could be of interest to others... I'm sure that I'm not alone in the need to read only

[R] how can I write code to detect whether the machine is Windows or Linux?

2008-07-23 Thread Philip James Smith
Hi R-People: I use 2 machines: a machine with a Windows XP operating system, and another with a Linux Ubuntu OS. I transport my code between these 2 machines. However, pathnames to data files always need to be adjusted to account for the OS that I'm working on. Here is my question: How do

[R] Help on nested FOR loops

2008-05-19 Thread Philip Twumasi-Ankrah
x 1 1 x11 1 2 x12 1 3 x13 2 1 x21 2 2 x22 2 3 x23 3 1 x31 3 2 x32 3 3 x33 ... Need help urgently. Thanks. Philip A Smile costs Nothing But Rewards Everything Happiness is not perfected until it is shared

[R] rbinom not using probability of success right

2008-05-28 Thread Philip Twumasi-Ankrah
I am trying to simulate a series of ones and zeros (1 or 0) and I am using rbinom but realizing that the number of successes expected is not accurate. Any advice out there. This is the example: N-500 status-rbinom(N, 1, prob = 0.15) count-sum(status) 15 percent of 500 should be 75 but what I

Re: [R] rbinom : Does randomness preclude precision?

2008-05-28 Thread Philip Twumasi-Ankrah
nature of the distribution. I mean if I simulated a Normal (0, 1) and got a Normal(1.5, 2) these would be very different distributions. It is the same with simulating a Binomial(1, p=0.15) and getting Binomial(1, 0.154) [EMAIL PROTECTED] wrote: On 28-May-08 12:53:26, Philip Twumasi-Ankrah wrote

[R] not meaningful for factors

2008-06-04 Thread Philip Twumasi-Ankrah
round this and by implication is there an alternative way of defining a logical operation applicable to factors. Thanks already for the help. Philip A Smile costs Nothing But Rewards Everything Happiness is not perfected until it is shared

Re: [R] not meaningful for factors

2008-06-04 Thread Philip Twumasi-Ankrah
() between two factors and that operation is not defined. This is what the error message is saying. Also you first attempt is probably missing a comma: node1 - data.trt[data.trt$stage==1B data.trt$diameter=== 4, ] On Wed, Jun 4, 2008 at 8:10 AM, Philip Twumasi-Ankrah [EMAIL PROTECTED

[R] Bug in levels() function?

2008-01-28 Thread Groot, Philip de
26 svn rev43537 language R version.string R version 2.6.1 (2007-11-26) So: should I submit a Bug report? Regards, Dr. Philip de Groot Wageningen University __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] Bug in levels() function?

2008-01-29 Thread Groot, Philip de
Hello all, Thank you for all the responses. It is clear to me now. However, if the drop possibility was also mentioned in the help text (in R, so ?levels) I wouldn't have asked this question at all! Regards, Philip From: Thomas Lumley [mailto:[EMAIL

[R] Help needed with Waterfall plot

2008-10-31 Thread Philip Twumasi-Ankrah
Hi friends, I need suggestions/directions on how to producing a waterfall plot for present extend of change in tumour size for a set of respondents in a study.  Example of use of waterfall plot is in the following slides presented at ASCO 2007 by Axel Grothey. Link is

Re: [R] read SAS file

2008-11-12 Thread Philip Twumasi-Ankrah
If you are using the windows version, installing packages can be done easily from the prompt in the R work space by the following statement: install.packages(name_of_package, dep=TRUE) the part of dep=TRUE is to allow associated dependencies of packages tp be installed along side. This saves

Re: [R] how to label the branches of a tree

2009-02-25 Thread Philip Twumasi-Ankrah
You may have to change/scale the sizes of the font by using cex and then to keep all labels within the plotting window, use xpd=TRUE. Like in text(fit, use.n=TRUE, cex=0.8, xpd=TRUE) Philip -- A Smile costs Nothing But Rewards Everything

Re: [R] read multiplan or sylk files in R

2009-02-25 Thread Philip Twumasi-Ankrah
According to the microsoft site http://support.microsoft.com/kb/323626;, SYLK files are ordinary text or csv files with a peculiar character in that the first two characters of the file are the uppercase letters. For example for a csv file, the first column may contain the

[R] Help with Forest Plots

2009-01-21 Thread Philip Twumasi-Ankrah
I will really appreciate help with plotting some forest plots. I am trying to show disparities in hazard ratios (and confidence intervals) for a set of covariates for 2 treatments (A and B say). I will to be able to keep the column of text (covariate names) but plot the 2 forest plots on an

[R] Data frame aggregation

2011-10-07 Thread PHILIP GLADWIN, BLOOMBERG TRADEBOOK:
Hello, Could anybody help me with this question? Example data frame NAME TICKER SHARES PERFORMANCE John ABC1000.05 John ABC1000 1.5 Alice EFG20 0.3 Paul HIJ50 1.0 Paul JKL

[R] most efficient plyr solution

2012-09-02 Thread Philip de Witt Hamer
implementation --Philip ### CODE START ### Ax - matrix(c(2,3,5,6, 3,7,8,9, 8,2,1,3), ncol = 4) Ay - matrix(c(9,8,5,7, 4,9,9,9, 8,7,5,4), ncol = 4) Bx - matrix(c(1,5,9,8, 4,7,8,9, 2,3,2,1), ncol = 4) By - matrix(c

[R] [R-pkgs] New R package for K-S goodness-of-fit tests

2016-03-29 Thread Novack-Gottshall, Philip M.
Greetings, We wanted to announce a new R package 'KScorrect' that carries out the Lilliefors correction to the Kolmogorov-Smirnoff test for use in (one-sample) goodness-of-fit tests. It's well-established it's inappropriate to use the K-S test when sample statistics are used to estimate

Re: [R] OK, next Q - a sort of factorial on a vector

2023-06-20 Thread Philip Rhoades via R-help
Ivan, On 2023-06-21 03:32, Ivan Krylov wrote: В Wed, 21 Jun 2023 03:13:52 +1000 Philip Rhoades via R-help пишет: This: !(1,2,3,4,5) would give this: (2,3,4,5, 6,8,10, 12,15, 20) Do you mean taking a product of every element of the vector with all following vector elements

Re: [R] Multiplying two vectors of the same size to give a third vector of the same size

2023-06-20 Thread Philip Rhoades via R-help
second Q was something reasonable to ask the list? Anyway now that I need to use R again, the basics should come back to me I hope - but I will check out the tutorials again in any case . . Thanks to Uwe as well (very nice!), Phil. On Tue, Jun 20, 2023 at 8:38 AM Philip Rhoades via R-h

Re: [R] OK, next Q - a sort of factorial on a vector

2023-06-20 Thread Philip Rhoades via R-help
Eric, On 2023-06-21 04:02, Eric Berger wrote: Hi Philip, In the decades since you learned R there have been some additions to the language. In particular, R now supports lambda functions. Applying this feature to Ivan's beautiful solution cuts down 7 characters (continuing his golfing analogy

Re: [R] Multiplying two vectors of the same size to give a third vector of the same size

2023-06-20 Thread Philip Rhoades via R-help
t. Of course, if you do not want to keep the NA, that can trivially be removed: C[!is.na(C)] [1] 0.00 0.36 0.81 I actually got there myself after a bit of experimenting! - but you pointed me in the right direction! Thanks! Phil. -Original Message- From: Philip Rhoades Sent: T

Re: [R] Multiplying two vectors of the same size to give a third vector of the same size

2023-06-20 Thread Philip Rhoades via R-help
< threshold] Ah, I see . . And you can of course do all the above as a one-liner. Yes. Is that what you wanted? Exactly except I meant: Result <- C[C > threshold] Thanks! Phil. -Original Message- From: R-help On Behalf Of Philip Rhoades via R-help Sent: Tues

[R] OK, next Q - a sort of factorial on a vector

2023-06-20 Thread Philip Rhoades via R-help
People, What I mean is, is there an elegant way to do this: This: !(1,2,3,4,5) would give this: (2,3,4,5, 6,8,10, 12,15, 20) and this: !(1,2,NA,4,5) would give this: (2,4,5, 8,10, 20) ? Thanks! Phil. -- Philip Rhoades PO Box 896 Cowra NSW 2794 Australia E-mail: p

[R] Multiplying two vectors of the same size to give a third vector of the same size

2023-06-20 Thread Philip Rhoades via R-help
between 0.0 and 1.0 or NULL - If there is a NULL in the multiplication, then the result in the cell for C is also a NULL - If there is a value less than (say) 0.01 in the multiplication, then the result in the cell for C is 0.0 Any suggestions appreciated! Phil. -- Philip Rhoades PO Box

<    1   2