[R] hist{graphics}

2019-07-13 Thread Steven T. Yen
# Can someone help with this simple frequency histogram problem (n = 15)? # I use four class limits: [90,95], [95,100], [100,105], [105,110]. # These coincide with the limits obtain by pretty {base}. # Proper frequencies would be: (1,5,6,3). # But hist{graphics} gives me a histogram showing

[R] Rtools required

2020-04-28 Thread Steven T. Yen
Dear All I updated to R-4.0.0. and also installed the latest Rtools 4.0 (to now the new default folder c:\rtools40). While compiling a package (binary) I received the follow marning message saying Rtools is required. Any clues? Thanks. Steven Yen WARNING: Rtools is required to build R

Re: [R] cannot print a list with cat

2022-10-24 Thread Steven T. Yen
ycontrol$gradtol) #works msg<-with(mycontrol,sprintf(fmt_string,tol,reltol,steptol,gradtol))   cat(msg) tol = 0.0e+00 reltol  = 0.0e+00 steptol = 1.0e-08 gradtol = 1.0e-10 Thids has worked great! Thanks again to all. Steven Yen On 10/25/2022 3:23 AM, Rui Barradas wrote: Às 16:21 de 24/10

Re: [R] cannot print a list with cat

2022-10-24 Thread Steven T. Yen
on, 24 Oct 2022 20:39:33 +0800 "Steven T. Yen" пишет: Printing this in a main program causes no problem (as shown above). But, using the command t(mycontrol) the line gets ignored. t() doesn't print, it returns a value. In R, there's auto-printing in the toplevel context (see ?withAut

Re: [R] cannot print a list with cat

2022-10-24 Thread Steven T. Yen
<- sprintf("(tol,reltol,steptol,gradtol): %E %E %E %E", mycontrol$tol,mycontrol$reltol,mycontrol$steptol,mycontrol$gradtol) message(msg) Hope this helps, Rui Barradas Às 14:25 de 24/10/2022, Steven T. Yen escreveu: Thank, Boris and Ivan. The simple command suggested by Ivan ( p

[R] cannot print a list with cat

2022-10-24 Thread Steven T. Yen
I have a "list" containing four elements, as shown below: > t(mycontrol) tol reltol steptol gradtol [1,] 0   0  1e-08   1e-12 Printing this in a main program causes no problem (as shown above). But, using the command t(mycontrol) the line gets ignored. Any idea? Thanks. Steven Yen

Re: [R] Help with a simple subroutine

2022-09-09 Thread Steven T. Yen
now where to start looking for a problem. Hand calculation can use pencil and paper or Excel or other tools. It is a tedious task but very effective. Tim -----Original Message- From: R-help On Behalf Of Ivan Krylov Sent: Friday, September 9, 2022 5:03 AM To: Steven T. Yen Cc: R-help Mailing List

Re: [R] cat in a subroutine

2022-10-13 Thread Steven T. Yen
Not really. fortytwo<-42 cat("\nMarginal and Discrete Effects of Gen Ordered Logit / Probit Probabilities",     "logisitic =",fortytwo,"\n") > goprobit1.r.me.kr<-me.gologit.r(goprobit1,embellished=TRUE, + resampling=TRUE,ndraws=5); goprobit1.r.me.kr Error in

Re: [R] cat in a subroutine

2022-10-13 Thread Steven T. Yen
te Effects of Gen Ordered Logit / Probit Probabilities") :   argument "j" is missing, with no default > On 10/13/2022 3:37 PM, Erin Hodgess wrote: > Hi Steven: > > Do you have a variable called logistic, please?  I think that might be > the culprit. > > Tha

[R] cat in a subroutine

2022-10-13 Thread Steven T. Yen
I have had an issue with printing (with cat) in a subroutine for which I do not have a applicable example, but I am still hoping to get some help. In the following, the first block of code works fine. ... t<-abs(me)/se; p<-2*(1-pt(t,nrow(x))) sig<-my.sig.levels(p)

Re: [R] cat in a subroutine

2022-10-13 Thread Steven T. Yen
rew for help! On 10/13/2022 10:30 PM, Bill Dunlap wrote: > Do you have another function called "cat" in scope? (with an argument > called "j")?  Before calling cat("...") call print(cat) and > print(find("cat")). > > -Bill > > >

[R] Background for word

2023-01-11 Thread Steven T. Yen
Dear, I am having a lucky day. I am programming in RStudio and when I type "black" (quotation signs included, the word turn into a word with black ground. Couldn't get rid of the backgroundcopying to Word, Excel, text editor and paste back to Rstudio, the word is still in black

Re: [R] Format printing with R

2022-11-21 Thread Steven T. Yen
00.32 [86,] 1.3000.74 R will still print 3 decimal places for the third column since it wants them to be of the same format, but each number is 2 sigfigs. On Mon, Nov 21, 2022 at 3:41 PM Steven T. Yen via R-help wrote: Hi, I have two variables with 86 observations each. Belo

Re: [R] Format printing with R

2022-11-22 Thread Steven T. Yen
nodiscfem   0.51    0.50 discfem 0.49    0.50 notradgrol  0.70    0.46 tradgrol    0.30    0.46 nofemnopol  0.80    0.40 femnopol    0.20    0.40 nopreshurt  0.66    0.47 On 11/22/2022 3:08 PM, Ivan Krylov wrote: On Tue, 22 Nov 2022 08:15:57 +0800 "Steven T. Yen" wrote: Thanks to

[R] Removing variables from data frame with a wile card

2023-01-13 Thread Steven T. Yen
I have a data frame containing variables "yr3",...,"yr28". How do I remove them with a wild cardsomething similar to "del yr*" in Windows/doc? Thank you. > colnames(mydata)   [1] "year"   "weight" "confeduc"   "confothr" "college"   [6] ...  [41] "yr3"    "yr4"    "yr5"

[R] knitr and tinytex

2023-04-26 Thread Steven T. Yen
Dear tinytex users I install knitr and tinytex with the following line commands in RStudio and it seems to work: install.packages("knitr") install.packages('tinytex') In the long past I was told to also run the following lines but now they do not seem to be needed. #update.packages(ask =

Re: [R] R does not run under latest RStudio

2023-04-06 Thread Steven T. Yen
p.s. But now I click some (but not all)  .R file and cannot see the source code. On 4/6/2023 5:28 PM, Steven T. Yen wrote: I updated to latest RStudio (RStudio-2023.03.0-386.exe) but R would not run. Error message: Error Starting R The R session failed to start. RSTUDIO VERSION RStudio

[R] R does not run under latest RStudio

2023-04-06 Thread Steven T. Yen
I updated to latest RStudio (RStudio-2023.03.0-386.exe) but R would not run. Error message: Error Starting R The R session failed to start. RSTUDIO VERSION RStudio 2023.03.0+386 "Cherry Blossom " (3c53477a, 2023-03-09) for Windows [No error available] I also tried RStudio 2022.12.0+353 ---

Re: [R] Removing variables from data frame with a wile card

2023-02-12 Thread Steven T. Yen
ld alternatively use >> >> x["V2"] >> >> which should be identical to x[, "V2", drop = FALSE], but some people don't >> like that because it doesn't look like matrix indexing anymore. >> >> >> On Sun, Feb 12, 2023, 17:18 S

Re: [R] Removing variables from data frame with a wile card

2023-02-12 Thread Steven T. Yen
is to remove the columns >> starting with yr: >> >> mydata <- mydata[, !grepl("^yr", colnames(mydata)), drop = FALSE] >> >> On Sat, Jan 14, 2023 at 1:56 AM Steven T. Yen wrote: >>> >>> I have a data frame containing variables "y

[R] Format printing with R

2022-11-21 Thread Steven T. Yen via R-help
Hi, I have two variables with 86 observations each. Below I print with the print command with digit=2. But, I am getting three decimal places for my first variable and two for the second. Please help. Thanks. > cbind(Mean,Std.dev)     Mean   Std.dev  [1,]  0.3107966  0.462820  [2,]