Re: [R] long integer handling

2020-11-14 Thread Yousri Fanous
3709551615 > > > > > > > > [1] https://www.mpfr.org/ > > > > Hope this helps, > > > > Rui Barradas > > > > Às 01:44 de 14/11/20, Yousri Fanous escreveu: > >> I want to calculate 2^64-1 which is > >> 18446744073709551

[R] long integer handling

2020-11-13 Thread Yousri Fanous
I want to calculate 2^64-1 which is 18446744073709551615 I set the following options to prevent scientific notation options("scipen"=100, "digits"=4) > x<-2^64 -1 > x [1] 18446744073709551616 This is not correct. There seem to be still some approximation happening. How can I get the correct resul

Re: [R] Playing a music file in R

2020-07-21 Thread Yousri Fanous
Google search "playing music with r" for example: https://stackoverflow.com/questions/31782580/how-can-i-play-birthday-music-using-r It can be a starting point Yousri On Tue, Jul 21, 2020 at 2:02 PM Vahid Borji wrote: > > Hello my R friends, > > How can we call a music file from our laptop (for

[R] How to write the segmented equation from MARS coefficients

2020-05-12 Thread Yousri Fanous
) -2.552332 I am at a loss at writing the equation linking the dependent and independent variables for such an output. What is h? Is it a function / operator? Thank you for your help Yousri fanous IBM Canada Software developer __ R-help@r-project.org

[R] why outer function is failing?

2020-05-04 Thread Yousri Fanous
ie(5,4)) [1] 1024 1) why outer is failing with rolldie? 2) What does the error mean? As a workaround I can do this thru a double loop, but I was hoping to get a more efficient way. Thanks for the help Yousri Fanous Software developer IBM Canada [[alternative HTML version deleted]] _

Re: [R] possible issue with scatterplot function in car package

2020-05-03 Thread Yousri Fanous
can install the package via install.packages("car", > repos="http://R-Forge.R-project.org";) > > Thanks again for the bug report, > John > > > On May 3, 2020, at 4:37 AM, Yousri Fanous > wrote: > > > > Thank you Professor John for your answer.

Re: [R] possible issue with scatterplot function in car package

2020-05-03 Thread Yousri Fanous
point away from the margin. This worked for the annotation but eventually led to the issue I described. Thank you so much for your time Yousri Fanous Software Developer IBM CANADA On Sat, May 2, 2020 at 11:47 PM Fox, John wrote: > > Dear Yousri, > > Yes, this is clearly a bug, and a

[R] possible issue with scatterplot function in car package

2020-05-02 Thread Yousri Fanous
library (car) aa <- data.frame(x=c(2, 5, 6, 7, 8), + y=c(5, 10, 9, 12, 11), + ch=c("N", "Q", "R", "S", "T"), + stringsAsFactors=FALSE) scatterplot(aa$x,aa$y,smooth = FALSE, grid = FALSE, frame = FALSE,regLine=F) Both x and y boxplots are correct and in particular the median of the x box is

Re: [R] [FORGED] what is the expected behavior of layout.show(n)

2020-04-29 Thread Yousri Fanous
hing like ... > > layout(...) > layout.show(n) > > Then to actually use the layout, you would do something like ... > > layout(...) > plot(...) > plot(...) > plot(...) > > Paul > > On 30/04/20 1:09 am, Yousri Fanous wrote: > > This works as expected: Histograms 1-3 are

[R] what is the expected behavior of layout.show(n)

2020-04-29 Thread Yousri Fanous
Hello Load package: ACSWR > data(sample) > layout(matrix(c(1,1,2,2,3,3,0,4,4,5,5,0),2,6,byrow=T),respect=F) > hist(sample[,1],main="Hist for sample I",xlab="sample 1",ylab="freq") > hist(sample[,2],main="Hist for sample II",xlab="sample 2",ylab="freq") > hist(sample[,3],main="Hist for sample III",

[R] Fwd: How to edit a dataframe/tibble in R console

2020-04-26 Thread Yousri Fanous
Jim solution posted Yousri -- Forwarded message - From: Jim Lemon Date: Sun, Apr 26, 2020 at 6:30 AM Subject: Re: [R] How to edit a dataframe/tibble in R console To: Yousri Fanous Hi Yousri, This may help: rootstock.df<-as.data.frame(lapply(rootstock,as.vector)) e

Re: [R] How to edit a dataframe/tibble in R console

2020-04-26 Thread Yousri Fanous
Thank you Jim. It works like a charm Yousri On Sat, Apr 25, 2020 at 11:25 PM Yousri Fanous wrote: > I recently installed R 3.6.3 on my windows laptop. > > R version 3.6.3 (2020-02-29) > > I am trying to import a stata .dta file to R > > >url<-“http://www.stata-press

[R] How to edit a dataframe/tibble in R console

2020-04-26 Thread Yousri Fanous
package editData for Rstudio, but I cannot use it from the console: >library(editData) >editData(rootstock) Error: RStudio not running How can I edit a tibble/dataframe from the console? Yousri Fanous Software Developer IBM Canada [[alternative HTML version deleted]] ___

[R] How can I run a TSP program inside R

2014-11-26 Thread Yousri Fanous
I have the following TSP code: options memory = 6; options crt; in 'mydat.tlb' ; ? ? Create 2 new variables ? age20 = age -20; lwage = log(wage); ? ? olsq lwage c f edy tenure age20 pu; How can I run it inside R? Where can I get more explanation on how to code for TSP [[alternative HTML