Re: [R] splitting data matrix into submatrices

2022-01-05 Thread PIKAL Petr
Hi As Jeff said for data frames you can use split. If you insist to work with matrices, the principle is similar but you cannot use split. mat <- matrix(1:20, 5,4) mat [,1] [,2] [,3] [,4] [1,]16 11 16 [2,]27 12 17 [3,]38 13 18 [4,]49 14 19 [5,

[R] [R-pkgs] PDtoolkit: Collection of Tools for PD Rating Model Development

2022-01-05 Thread Andrija Djurovic
Dear R users, I am happy to announce that my new package PDtoolkit is now available on CRAN. The goal of this package is to cover the most common steps in probability of default (PD) rating model development and validation. The main procedures available are those that refer to univariate, bivaria

Re: [R] splitting data matrix into submatrices

2022-01-05 Thread Stephen H. Dawson, DSL via R-help
Hi, Please post the data structure so it is more clear what data is being massaged. Thanks, *Stephen Dawson, DSL* /Executive Strategy Consultant/ Business & Technology +1 (865) 804-3454 http://www.shdawson.com On 1/4/22 10:52 PM, Faheem Jan via R-help wrote: I ha

Re: [R] splitting data matrix into submatrices

2022-01-05 Thread Avi Gross via R-help
Faheem seems to reply to people in private and I replid to him in private but seeing later messages, am giving a synopsis in public. I too suggesed that using a data.frame is a better way to keep his data and use it for some purposes. But my understanding is that his matrix is fairly easy to unde

[R] Error: if statement: missing value where TRUE/FALSE needed

2022-01-05 Thread Chuck Coleman via R-help
This is a rather complex error, for which I created  https://sourceforge.net/projects/rhelp/files/Metro/ to hold a minimal workspace with all files needed to make everything work.  I'm afraid I can't make a minimal example because the environment may be involved.  I suspect that it is an error w

Re: [R] Error: if statement: missing value where TRUE/FALSE needed

2022-01-05 Thread Ivan Krylov
On Wed, 5 Jan 2022 15:47:07 + (UTC) Chuck Coleman via R-help wrote: > I then made the browser() statement conditional to stop execution if > a missing argument were encountered and detectspikes() happily passed > it and crashed. How exactly do you check for a missing argument? Could options

Re: [R] Error: if statement: missing value where TRUE/FALSE needed

2022-01-05 Thread Bill Dunlap
And how does one [easily] download those files from sourceforge? -Bill On Wed, Jan 5, 2022 at 10:15 AM Chuck Coleman via R-help < r-help@r-project.org> wrote: > This is a rather complex error, for which I created > https://sourceforge.net/projects/rhelp/files/Metro/ to hold a minimal > workspace

Re: [R] Error: if statement: missing value where TRUE/FALSE needed

2022-01-05 Thread Duncan Murdoch
On 05/01/2022 10:47 a.m., Chuck Coleman via R-help wrote: This is a rather complex error, for which I created  https://sourceforge.net/projects/rhelp/files/Metro/ to hold a minimal workspace with all files needed to make everything work.  I'm afraid I can't make a minimal example because the en

Re: [R] Error: if statement: missing value where TRUE/FALSE needed

2022-01-05 Thread Ivan Krylov
On Wed, 5 Jan 2022 21:22:37 +0300 Ivan Krylov wrote: > How exactly do you check for a missing argument? To answer my own question, the check is >> browser(expr = { >> is.na(w1) | is.na(ub) | is.na(m) | is.na(wi) | is.na(lb) >> }) I think that there are NAs in xseg, which I don't see a check f

[R] Save a graph file use jpeg(file=file)

2022-01-05 Thread Sorkin, John
I am trying to create a 3-D graph (using scatter3d) and save the graph to a file so I can insert the graph into a manuscript. I am able to create the graph. When I run the code below an RGL window opens that has the graph. The file is saved to disk after dev.odd() runs. Unfortunately, when I ope

Re: [R] Error: if statement: missing value where TRUE/FALSE needed

2022-01-05 Thread Duncan Murdoch
On 05/01/2022 2:09 p.m., Ivan Krylov wrote: On Wed, 5 Jan 2022 21:22:37 +0300 Ivan Krylov wrote: How exactly do you check for a missing argument? To answer my own question, the check is browser(expr = { is.na(w1) | is.na(ub) | is.na(m) | is.na(wi) | is.na(lb) }) I think that there are

Re: [R] Save a graph file use jpeg(file=file)

2022-01-05 Thread Duncan Murdoch
On 05/01/2022 2:45 p.m., Sorkin, John wrote: I am trying to create a 3-D graph (using scatter3d) and save the graph to a file so I can insert the graph into a manuscript. I am able to create the graph. When I run the code below an RGL window opens that has the graph. The file is saved to disk

Re: [R] Save a graph file use jpeg(file=file)

2022-01-05 Thread Sorkin, John
Tim Thank you for your suggestion. The problem with your suggestion is that the copied image is low resolution, 96dpi. Saved files can have higher resolution. Thank you John John David Sorkin M.D., Ph.D. Professor of Medicine Chief, Biostatistics and Informatics University of Maryland School of M

Re: [R] how to run r biotools boxM terst on multiple groups?

2022-01-05 Thread Michael L Friendly
Try heplots::boxM This also has a nice plot method to visualize the contributions to box's M test. See my paper: https://www.datavis.ca/papers/EqCov-TAS.pdf > -Original Message- > From: R-help > mailto:r-help-boun...@r-project.org>> On Behalf > Of Luigi > Marongiu > Sent: Tuesday,

Re: [R] Save a graph file use jpeg(file=file)

2022-01-05 Thread Ebert,Timothy Aaron
The simple solution for Windows is to use (windows icon) + shift + s. You then select a portion of your screen and it gets copied to your clipboard. You can then paste that into your document. Of course this will not work if it is important that the reader is able to rotate the graphic. Tim --

Re: [R] Save a graph file use jpeg(file=file)

2022-01-05 Thread Sorkin, John
Ducan, As always, you are very giving of your time to help R users. Thank you! scatter3d is from the car package. As I understand snapshot3d, it takes a screen shot and saves the resultant file. This implies that the resultant file will be 72 DPI. I need to get a higher resolution image, at le

Re: [R] [External] Re: Save a graph file use jpeg(file=file)

2022-01-05 Thread Richard M. Heiberger
you can make the rgl window full screen, and then stretch the graph to fill the window, and then use snapshot 3d From: R-help on behalf of Sorkin, John Sent: Wednesday, January 5, 2022 8:23:34 PM To: Duncan Murdoch ; r-help@r-project.org (r-help@r-project.org)

Re: [R] [External] Re: Save a graph file use jpeg(file=file)

2022-01-05 Thread Sorkin, John
I'll try that. Get Outlook for iOS From: Richard M. Heiberger Sent: Wednesday, January 5, 2022 8:31:15 PM To: Sorkin, John ; Duncan Murdoch ; r-help@r-project.org (r-help@r-project.org) Subject: Re: [External] Re: [R] Save a graph file us