[R] assistance is greatly needed

2017-03-27 Thread BR_email
Hi R'ers: I am seeking the attachment. Any help is greatly appreciated. Thanks. Bruce Code *** yhat <- seq(1, 0.05, length.out = 20) Response <-c(1,0,1,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,1,0) cum_R<- cumsum(Response) sam_size <- length(Response) cum_n<- seq(1:1,length=20) cum_wt

[R] I want to delete "yhat" and transpose "Response" into a vector

2017-03-29 Thread BR_email
Hi R'ers: I need a little help. Thanks in advance. Bruce dd<- read.csv("C:/R_Data/firstRdata.csv", sep=",", header=TRUE) dd<- data.frame(yhat,Response) attach(dd) dd <- dd[order(-yhat),] dd # delete yhat and transpose Response into a vector Attached is dataset. -- Bruce

Re: [R] How can I delete column yhat AND STILL retain the order of Response?

2017-04-01 Thread BR_email
this helps, Rui Barradas Em 01-04-2017 17:32, BR_email escreveu: Response<- read.csv("C:/R_Data/firstRdata.csv", sep=",", header=TRUE) Response Response<- data.frame(Response) attach(Response) Response Response<- Response[order(-yhat),] Response<- Resp

Re: [R] Too strange that I cannot install several packages

2017-04-10 Thread BR_email
Thanks, Jacob. Bruce Simmering, Jacob E wrote: Bruce, `sample` doesn’t appear to be an R package. `resample` installed for me. `apply` and `sapply` aren’t packages either. `sample`, `apply` and `sapply` are all functions, however. On Apr 10, 2017, at 12:08 PM, BR_email <b...@dmst

[R] Too strange that I cannot install several packages

2017-04-10 Thread BR_email
Hi Rers: Is there anything I can check for as to why I cannot install several packages, i.e., sample, resample, resample_bootstrap, apply, sapply, ...? The error message I get is: install.packages("sample") Installing package into ‘C:/Users/BruceRatner/Documents/R/win-library/3.3’ (as ‘lib’

[R] Seeking to Dummify Categorical Variables

2017-04-02 Thread BR_email
Hi R'ers: I need a jump start to obtain my objective. Assistance is greatly appreciated. Bruce *** #Given Gender Dataset r1 <- c( 1, 2, 3) c1 <- c( "male", "female", "NA") GENDER <- data.frame(r1,c1) names(d1_3) <- c("ID","Gender") GENDER -- _OBJECTIVE_: To dummify

Re: [R] Seeking to Dummify Categorical Variables

2017-04-02 Thread BR_email
MSTAT1.com Machine-Learning Data Mining and Modeling -- www.GenIQ.net David Winsemius wrote: On Apr 2, 2017, at 11:48 AM, BR_email <b...@dmstat1.com> wrote: Hi R'ers: I need a jump start to obtain my objective. Assistance is greatly appreciated. Bruce *** #Given Gender Dataset r1

Re: [R] Setting .Rprofile for RStudio on a Windows 7 x64bit

2017-04-16 Thread BR_email
Peter: Thanks for reply and suggestion. Sorry, I am not sure how to assess. The doc is too technical for me to understand. I found multiple instructions online and in R and RStudio books. I'm doing what it says, but no success. The instructions are simple as a-b-c, but some setting within the

Re: [R] Setting .Rprofile for RStudio on a Windows 7 x64bit

2017-04-17 Thread BR_email
7:34 PM, David Winsemius <dwinsem...@comcast.net <mailto:dwinsem...@comcast.net>> wrote: > > >> On Apr 16, 2017, at 3:43 PM, BR_email <b...@dmstat1.com <mailto:b...@dmstat1.com>> wrote: >> >> Peter: >> Thanks for reply and

Re: [R] Setting .Rprofile for RStudio on a Windows 7 x64bit

2017-04-17 Thread BR_email
I did it both ways, with and without: no success. 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: Doing anything as Administrator means you

Re: [R] Setting .Rprofile for RStudio on a Windows 7 x64bit

2017-04-17 Thread BR_email
Bill: Here's what I got: dir(c(".", Sys.getenv("HOME"), R.home("etc")), pattern="Rprofile") [1] "Rprofile.site" 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

Re: [R] Setting .Rprofile for RStudio on a Windows 7 x64bit

2017-04-17 Thread BR_email
Bill: I did workaround. I created the Rprofile files with file type R, not txt. Bruce William Dunlap wrote: I believe someone already mentioned it, but notepad makes it hard to save a file without the ".txt" extension to its name. R does not do anything with .Rprofile.txt, only .Rprofile,

Re: [R] Setting .Rprofile for RStudio on a Windows 7 x64bit

2017-04-17 Thread BR_email
e exention at all. Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Apr 17, 2017 at 8:13 AM, BR_email <b...@dmstat1.com> wrote: Bill: I did workaround. I created the Rprofile files with file type R, not txt. Bruce William Dunlap wrote: I believe someone already mentioned it, but notep

Re: [R] Setting .Rprofile for RStudio on a Windows 7 x64bit

2017-04-17 Thread BR_email
up. With gratitude, 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 Peter Dalgaard wrote: On 17 Apr 2017, at 19:01 , BR_email <b...@dmstat1.com>

Re: [R] Setting .Rprofile for RStudio on a Windows 7 x64bit

2017-04-17 Thread BR_email
wrote: No calls please. Just show the group what .../etc/Rprofile-site contained. Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Apr 17, 2017 at 8:36 AM, BR_email <b...@dmstat1.com> wrote: Bill: I feel you are nailing it for me. Can I please call you, but I am getting a littl

Re: [R] Setting .Rprofile for RStudio on a Windows 7 x64bit

2017-04-17 Thread BR_email
STAT1.com Machine-Learning Data Mining and Modeling -- www.GenIQ.net BR_email wrote: Bill: Success, almost there: writeLines(readLines("C:/Users/BruceRatner/Documents/.Rprofile.site")) options(prompt="R> ") set.seed(12345) rm(list=ls()) > Yet, still not affecting the

Re: [R] Setting .Rprofile for RStudio on a Windows 7 x64bit

2017-04-17 Thread BR_email
(echo=TRUE, ".../etc/Rprofile.site") (replace the ellipsis by whatever dir(full.names=TRUE,...) showed). Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Apr 17, 2017 at 8:24 AM, BR_email <b...@dmstat1.com> wrote: Bill: Here's what I got: dir(c(".", Sys.getenv("HOME")

Re: [R] Setting .Rprofile for RStudio on a Windows 7 x64bit

2017-04-17 Thread BR_email
rofile-site contained. Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Apr 17, 2017 at 8:36 AM, BR_email <b...@dmstat1.com> wrote: Bill: I feel you are nailing it for me. Can I please call you, but I am getting a little lost, and losing your valuable help? Bruce Bruce Ratner, Ph.D. T

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

2017-04-20 Thread BR_email
Cum_RespRate <- cum_R/cum_n)*100 - David L Carlson Department of Anthropology Texas A 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-p

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

2017-04-21 Thread BR_email
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 -Original Message----- From: BR_email [mailto:b...@dmstat1.com] Sent: Thursday, April 20, 2017 4

Re: [R] Setting .Rprofile for RStudio on a Windows 7 x64bit

2017-04-19 Thread BR_email
Do you think that you could post the final solution to the problem? That way it would be stored with this thread and the next person who has the same problem would be able to locate the FINAL solution. --JJS On Mon, April 17, 2017 12:47 pm, BR_email wrote: TO _ALL_: THANK YOU. THANK YOU. THANK YOU. Af

[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

Re: [R] Setting .Rprofile for RStudio on a Windows 7 x64bit

2017-04-15 Thread BR_email
David: Thank you. 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 David Winsemius wrote: On Apr 15, 2017, at 12:14 PM, BR_email <b...@dmstat1.com>

Re: [R] Setting .Rprofile for RStudio on a Windows 7 x64bit

2017-04-15 Thread BR_email
l your desire. >> >> Perhaps the following link works better for you though: >> https://www.bing.com/search?q=rstudio+rprofile <https://www.bing.com/search?q=rstudio+rprofile> > > Another promising search strategy would be SO with "[rstudi

Re: [R] Setting .Rprofile for RStudio on a Windows 7 x64bit

2017-04-15 Thread BR_email
the one in HOME will not be. (getwd() should be the startup directory.) Bill Dunlap TIBCO Software wdunlap tibco.com On Sat, Apr 15, 2017 at 9:06 AM, BR_email <b...@dmstat1.com> wrote: Hi R-helpers: Can you offer assistance in my getting .Rprofile and .Rprofile.site to run in RStud

Re: [R] Setting .Rprofile for RStudio on a Windows 7 x64bit

2017-04-15 Thread BR_email
. Perhaps the following link works better for you though: https://www.bing.com/search?q=rstudio+rprofile B. On Apr 15, 2017, at 3:14 PM, BR_email <b...@dmstat1.com> wrote: Bill: Thanks for reply. Sorry, I do not understand it. For example, where do I put "file.path(getwd(), &

[R] Setting .Rprofile for RStudio on a Windows 7 x64bit

2017-04-15 Thread BR_email
Hi R-helpers: Can you offer assistance in my getting .Rprofile and .Rprofile.site to run in RStudio? When I start RStudio nothing happens. I have put .Rprofile in [1] and [2], and .Rprofile.site in [2]. Below, the info I believe you need to know. Thanks, in advance, for any help. Bruce The

Re: [R] Setting .Rprofile for RStudio on a Windows 7 x64bit

2017-04-17 Thread BR_email
Berend: Something looks good, but RStudio still Rprofile still doees not affect the launch. source(echo=TRUE, "C:/Users/BruceRatner/Documents/.Rprofile.site") options(prompt="R> ") set.seed(12345) rm(list=ls()) R> Bruce Ratner, Ph.D. The Significant Statistician™ (516) 791-3544

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

2017-04-22 Thread BR_email
nse, Response, Response, Response, Response) Regards, Bruce BR_email wrote: David: Its' not going my way today. I'll try to work with all that you provided. It's late Friday and I cannot impose on you much more. Thank you. If I may, after I rework it, I'll contact you, okay? Have great week

Re: [R] "Copy-pastable" output of 1000 plus variables

2017-04-23 Thread BR_email
David: I cannot demonstrate _with_ _code_ , otherwise I would not have a problem. However, I can illustrate: In SAS, I can run Proc SQL for a dump, VARLIST_IS_HERE, showing on the computer screen the variables, e.g., ID, X1, X2, X3, ..., X1000, that I can copy and paste into the editor window

Re: [R] "Copy-pastable" output of 1000 plus variables

2017-04-23 Thread BR_email
Jeff: Thanks, Please see my reply to David. 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: Coming from an Excel background, copying

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

2017-04-22 Thread BR_email
Peter: Nice, 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 peter dalgaard wrote: On 22 Apr 2017, at 13:47 , BR_email <b...@dmstat1.com>

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(

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

2017-04-21 Thread BR_email
(decc) dec_mean <- aggregate(Response, by=list(decc), mean) dd_<- data.frame(cum_R, sam_size, cum_wt, cum_n, decc) dd <- cbind(Response, dd_) names(dd)[2] <- "cum_R" dec_mean<- aggregate(Response ~ decc, dd, mean) ** BR_email wrote: David: Hate to bother y

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

2017-04-21 Thread BR_email
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 you. Then those numbers are replicated 10 times. Why not just s

Re: [R] Seeking to Dummify Categorical Variables

2017-04-02 Thread BR_email
le <- as.integer(GENDER$Gender == "female") Hope this helps, Rui Barradas Em 02-04-2017 19:48, BR_email escreveu: Hi R'ers: I need a jump start to obtain my objective. Assistance is greatly appreciated. Bruce *** #Given Gender Dataset r1 <- c( 1, 2, 3) c1 <

[R] How can I delete column yhat AND STILL retain the order of Response?

2017-04-01 Thread BR_email
Hi R'ers: Attached, my R_code, the dataset, and my query. How can I delete column yhat AND STILL retain the order of Response? When I remove yhat, the resultant dataset has Response in the original order, not the reordered version I created. Any help is greatly accepted.

Re: [R] How can I delete column yhat AND STILL retain the order of Response?

2017-04-01 Thread BR_email
you do to it will only have effect on the copy. The original is left as it were. So run the same code (with the obvious bug yhatResponse$yhat corrected) but eliminating the 'attach' instruction. And see if it reorders Response. Hope this helps, Rui Barradas Em 01-04-2017 17:32, BR_email

Re: [R] How can output tables be converted to data files?

2017-04-05 Thread BR_email
David: If I may, I was successful in writing csv files for rcorr, n, but not pvalue, which is empty. I set digits=5, thinking the small numbers might not show with default setting. Here's the code I used. Do you see a bug? Thanks. Bruce Y <- rcorr(as.matrix(X)) digits=5 write.csv(Y$p, file =

[R] How can output tables be converted to data files?

2017-04-05 Thread BR_email
Hi R'ers: This code produces: 3x3 rcorr matrix, one-element vector, and 3x3 p-value matrix. I would like to use these outputs as data files. How can these output tables be converted to data files? Any assistance is appreciated. Thanks. Bruce library(Hmisc) mtcars5 <-

Re: [R] Setting .Rprofile for RStudio on a Windows 7 x64bit

2017-04-17 Thread BR_email
, no R, no txt. You guys drilled down, and hit solid gold for me, which lead to my understanding the issue, at least as I see it. Pure GOLD Medal team work. Again, I truly thank you. Bruce BR_email wrote: TO _ALL_: THANK YOU. THANK YOU. THANK YOU. After hours, and hours, and hours

Re: [R] "Copy-pastable" output of 1000 plus variables

2017-04-24 Thread BR_email
lect==1] David L. Carlson Department of Anthropology Texas A University -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of BR_email Sent: Sunday, April 23, 2017 3:47 PM To: Jeff Newmiller <jdnew...@dcn.davis.ca.us>; r-help@r-project.org Subject

Re: [R] "Copy-pastable" output of 1000 plus variables

2017-04-24 Thread BR_email
iable you wish to include fix(choose) # Your list of variables will be the vector mycols mycols <- choose$cols[choose$select==1] David L. Carlson Department of Anthropology Texas A University -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of BR_email

Re: [R] Cannot load library(glmulti), because: Error: package ‘rJava’ could not be loaded

2017-05-03 Thread BR_email
Jeff: Sorry, the previous email was accidentally sent as I was talking to SAS. Apparently, I do not have any Java in my system. I thought SAS required it, but no longer does. So I guess I will install Java. Which Java do I need to install, please? Bruce BR_email wrote: Jeff: Thanks

Re: [R] Cannot load library(glmulti), because: Error: package ‘rJava’ could not be loaded

2017-05-03 Thread BR_email
\BruceRatner\AppData\Local\Temp\RtmpOC7vMl\downloaded_packages R> library(glmulti) Loading required package: rJava BR_email wrote: Jeff: Sorry, the previous email was accidentally sent as I was talking to SAS. Apparently, I do not have any Java in my system. I thought SAS requi

[R] Cannot load library(glmulti), because: Error: package ‘rJava’ could not be loaded

2017-05-03 Thread BR_email
Hi R-helpers: Any assistance to get library(glmulti) on my PC/Windows 7, 64bit, would be appreciated. Bruce R> install.packages("glmulti") Installing package into ‘C:/Users/BruceRatner/Documents/R/win-library/3.3’ (as ‘lib’ is unspecified) trying URL

Re: [R] functions similar to glm

2017-05-11 Thread BR_email
you please? Bruce __ On May 11, 2017, at 8:39 AM, Bert Gunter <bgunter.4...@gmail.com <mailto:bgunter.4...@gmail.com>> wrote: ?glmulti seems clear enough to me. If not, pls check the reference given therein. Bert On May 11, 2017 5:22 AM, "BR

Re: [R] functions similar to glm

2017-05-11 Thread BR_email
Thanks, Bert. I would expect the list to include, at least lm. The reference states, "See Examples section." But, there is nothing in that section or elsewhere!! Bruce Bert Gunter wrote: Probably? : All functions for which a link function of the response is modeled as a linear predictor of

Re: [R] Xtable with long column headings/names

2017-05-15 Thread BR_email
_Data/Table.html", include.rownames = FALSE, caption.placement = "top", align = "p{.5in}p{.5in}p{.5in}p{.5in}p{.5in}p{.5in}") BR_email wrote: John: After I generate the xtable table, I manually edited (by inserting ) the

Re: [R] Xtable with long column headings/names

2017-05-15 Thread BR_email
John: After I generate the xtable table, I manually edited (by inserting ) the html header, below. Is there a way in xtable that I can set some setting to affect my xtable table? Thanks for your reply. Bruce Analysis DECILE NUMBER OF INDIVIDUALS NUMBER OF RESPONDERS RESPONSE

Re: [R] Xtable with long column headings/names

2017-05-16 Thread BR_email
caption = "Decile Analysis based on Y (RESPONSE) regressed on X1 X2 X3") DECILE_TABLE print.xtable(DECILE_TABLE, type="html", include.rownames = FALSE, caption.placement = "top", align = "p{.5in}p{.5in}p{.5in}p{.5in}p{.5in}p{.5in}") #==

Re: [R] Xtable with long column headings/names

2017-05-16 Thread BR_email
to the list. Have a look at Reproducibility · Advanced R. <http://adv-r.had.co.nz/Reproducibility.html> for some suggestions on how to put one together. In particular, some sample data in dput form ( see ?dput) would be best. Data in dput() format is essentially an exact copy of

Re: [R] Formatting column displays

2017-05-05 Thread BR_email
Jeff: I cannot install the ReporteR package. Is there a work-around, or is the error message correct? Thanks. Bruce R> install.packages("ReporteR") Installing package into ‘C:/Users/BruceRatner/Documents/R/win-library/3.3’ (as ‘lib’ is unspecified) Warning in install.packages : package