Re: [R] Bug report for package foreign anf functon write.foreign

2024-06-06 Thread Kevin Thorpe
I haven’t used this function in a long time, but it sounds like the issue is the format names for the formats catalog, not the variable names. You might try the haven package as it can create SAS datasets directly, although there are limitations (I think). > On Jun 6, 2024, at 4:45 AM, Julien J

Re: [R] Basic astronomy package recommendation wanted.

2024-01-30 Thread Kevin Thorpe
There is also the package solrad that might do some of this. It is more intended for calculating solar radiation, which is probably not what you want, but may do other things you may find helpful. > On Jan 30, 2024, at 5:44 AM, Enrico Schumann wrote: > > On Tue, 30 Jan 2024, Richard O'Keefe w

Re: [R] Error in setwd(dir) when initializing R

2023-11-20 Thread Kevin Thorpe
I think that you may be correct about OneDrive being related. I have seen OneDrive associated with problems before. What happens if you manually set the working directory to that location? Does it work if your default home directory is local to your machine? > On Nov 20, 2023, at 6:18 AM, Ana

Re: [R] R installation

2023-01-26 Thread Kevin Thorpe
t version that said for > M1 Macs and higher. > > Vivian Jungels > >> On Jan 26, 2023, at 11:16 AM, Kevin Thorpe wrote: >> >> The most obvious question is did you download the correct package? There is >> a version for Intel-based MACs and for M1-based M

Re: [R] R installation

2023-01-26 Thread Kevin Thorpe
The most obvious question is did you download the correct package? There is a version for Intel-based MACs and for M1-based MACs. > On Jan 25, 2023, at 11:22 AM, Vivian Jungels via R-help > wrote: > > Hello! > > I am trying to install R and its says there is an error with the software. I >

Re: [R] foreign package: unable to read S-Plus objects

2023-01-17 Thread Kevin Thorpe
I think you may be right about the cause. From the, “R Data Import/Export” document I find, Function read.S which can read binary objects produced by S-PLUS 3.x, 4.x or 2000 on (32-bit) Unix or Windows (and can read them on a different OS). This is able to read many but not all S objects: in pa

Re: [R] Funky calculations

2022-02-01 Thread Kevin Thorpe
This looks like a version of FAQ 7.31. > On Feb 1, 2022, at 8:45 AM, Nathan Boeger wrote: > > [You don't often get email from nboe...@gmail.com. Learn why this is > important at http://aka.ms/LearnAboutSenderIdentification.] > > Hello, > > I found something strange and maybe I am going nuts b

Re: [R] (Off-Topic) Time for a companion mailing list for R packages?

2022-01-13 Thread Kevin Thorpe
This is an interesting issue and something I have been thinking about raising with my fellow volunteer moderators. I honestly don’t know what the best solution is. Personally, I would loathe having to check multiple web-forums/mailing lists to find an answer. New users often do not appreciate t

Re: [R] vectorization of loops in R

2021-11-17 Thread Kevin Thorpe
If I follow what you are trying to do, you want the mean of z for each value of y. tapply(df$z, df$y, mean) > On Nov 17, 2021, at 8:20 AM, Luigi Marongiu wrote: > > Hello, > I have a dataframe with 3 variables. I want to loop through it to get > the mean value of the variable `z`, as follows:

Re: [R] tidyverse: read_csv() misses column

2021-11-01 Thread Kevin Thorpe
Is there a leading space on those variables for that row? Kevin > On Nov 1, 2021, at 2:01 PM, Rich Shepard wrote: > > On Mon, 1 Nov 2021, Jeff Newmiller wrote: > >> Sorry... untested code... use which... not where. > > Jeff, > > That problem's resolved; problems() found the lines. > > Ques

Re: [R] tidyverse: read_csv() misses column

2021-11-01 Thread Kevin Thorpe
I do not have a specific answer to your particular problem. All I can say is when a CSV import doesn’t work, it can mean there is something in the CSV file that is unexpected. When read_csv() fails, I will try read.csv() to compare the results. Kevin > On Nov 1, 2021, at 12:40 PM, Rich Shepar

Re: [R] Need help in R

2021-10-26 Thread Kevin Thorpe
This looks suspiciously like homework and this list does have a no homework policy. If it is not homework, please forgive the assumption. > On Oct 26, 2021, at 4:09 PM, Anas Jamshed wrote: > > I need help to these questions > > ### Question 1 > Create a variable containing a sequence of numbe

Re: [R] Unusual Error Loading tidyverse

2021-10-07 Thread Kevin Thorpe
not found in the user library. > In most user-administered R installations you are better off acting as though > the system library wasn't there. > > On October 7, 2021 7:56:05 AM PDT, Kevin Thorpe > wrote: >> I thought I would close the loop on this. It was really

Re: [R] Unusual Error Loading tidyverse

2021-10-07 Thread Kevin Thorpe
27;t see the new installs. > > Duncan Murdoch > > On 24/09/2021 2:04 p.m., Kevin Thorpe wrote: >> I did try installing xml2 and it appeared to complete. I will ask him to try >> again and send me the output. >>> On Sep 24, 2021, at 1:58 PM, Jeff Newmiller >>&

Re: [R] How to install package meta on Linux Ubuntu 21?

2021-09-29 Thread Kevin Thorpe
It looks to me like you do not have the development packages installed in Ubuntu. These should be easy to obtain with a suitable apt-get command, but since I am not a primary Ubuntu user, I do not know the package names. > On Sep 29, 2021, at 9:46 AM, Luigi Marongiu wrote: > > Hello > I have

Re: [R] Unusual Error Loading tidyverse

2021-09-24 Thread Kevin Thorpe
R won't see the new installs. > > Duncan Murdoch > > On 24/09/2021 2:04 p.m., Kevin Thorpe wrote: >> I did try installing xml2 and it appeared to complete. I will ask him to try >> again and send me the output. >>> On Sep 24, 2021, at 1:58 PM, Jeff Newmill

Re: [R] Unusual Error Loading tidyverse

2021-09-24 Thread Kevin Thorpe
ind of "dependency missing" problem tends to be a recurring problem > particularly on Windows but in general when some deeply-embedded dependency > fails to load or is removed in preparation for upgrading. > > On September 24, 2021 10:40:41 AM PDT, Kevin Thorpe > wr

[R] Unusual Error Loading tidyverse

2021-09-24 Thread Kevin Thorpe
Below is some output from one of my students. I have never seen this error and tried a few things (updating packages for one) but am at a loss to help further. Would appreciate suggestions that I can pass along. Here is the error. I tried an install.packages(“xml2”) which appeared to complete b

Re: [R] ask for help about lme function

2021-07-20 Thread Kevin Thorpe
You might get better answers on the r-sig-ME list. The lmer() function from lme4 handles crossed and non-nested random effects quite seamlessly. I cannot comment on whether or not lme() can as well. -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Kno

Re: [R] Incomplete violin chart representation

2021-05-20 Thread Kevin Thorpe
My guess would be there are only 2 observations contributing to that third plot, which is probably not enough to show anything else. -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Assistant Professor, Dalla Lana S

Re: [R] cox.zph

2021-04-01 Thread Kevin Thorpe
While the statements below about cox.zph are true, plotting the cox.zph result does tell you what the HR is doing. I never use one without the other. -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Assistant Profes

Re: [R] about a p-value < 2.2e-16

2021-03-19 Thread Kevin Thorpe
I have to ask since. Are you sure the journal simply means by exact p-value that they don’t want to see a p-value given as < 0.0001, for example, and simply want the actual number? I cannot imagine they really meant exact as in the p-value from some exact distribution. -- Kevin E. Thorpe Head

Re: [R] ISO recommendations for plot output format from R to MS Word

2021-02-18 Thread Kevin Thorpe
> On Feb 18, 2021, at 2:03 PM, Robert Dodier wrote: > > EXTERNAL EMAIL: > > On Thu, Feb 18, 2021 at 10:12 AM Kevin Thorpe > wrote: > >> I would think that it would be more seamless to use Rmarkdown. >> Simply put the plotting code into an Rmarkdown file an

Re: [R] ISO recommendations for plot output format from R to MS Word

2021-02-18 Thread Kevin Thorpe
I did not see the original thread so this may have been discussed. I would think that it would be more seamless to use Rmarkdown. Simply put the plotting code into an Rmarkdown file and send it straight to Word. Is there a reason why this is not a viable option? -- Kevin E. Thorpe Head of Biosta

Re: [R] Meta: R-Help reply-to

2020-12-15 Thread Kevin Thorpe
You could send the request to r-help-ow...@r-project.org. That goes to the moderators and administrator. Kevin -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Assistant Professor, Dalla Lana School of Public Healt

Re: [R] Inappropriate color name

2020-11-16 Thread Kevin Thorpe
This is a standard colour palette name that has been in use for years. R did not invent it. It simply uses the standard names. Look up indianred on google. You will find Wikipedia entries, hex codes for the colour, etc. This has nothing to do with R, in my opinion. -- Kevin E. Thorpe Head of B

Re: [R] R for mac

2020-09-25 Thread Kevin Thorpe
For Mac specific issues the list R-SIG-Mac might be better. To my knowledge, R cannot be installed on a chromebook. -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Assistant Professor, Dalla Lana School of Public H

Re: [R] File names for mac newby

2020-01-21 Thread Kevin Thorpe
You would also need to drop the c: as that is a DOS/Windows thing. -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Assistant Professor, Dalla Lana School of Public Health University of Toronto email: kevin.tho...@ut

Re: [R] Having problems with the ifelse and negative numbers

2019-12-09 Thread Kevin Thorpe
The sqrt(-A) is evaluated for all A. The result returned is conditional on the first argument but the other two arguments are evaluated on the entire vector. Kevin -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's A

Re: [R] (no subject)

2019-11-04 Thread Kevin Thorpe
Have you read the help pages of the two functions? That is where I would start. -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Assistant Professor, Dalla Lana School of Public Health University of Toronto email: ke

Re: [R] Using options(max.print = 1000000) to read in data

2019-07-08 Thread Kevin Thorpe
> On Jul 8, 2019, at 10:06 AM, Spencer Brackett > wrote: > > Hello, > > I am trying to reload some data into R in order to check to see if it is > formatted as a matrix. I used the command options(max.print = 1000) to > account for the 20,000 some rows omitted previously when just using t

Re: [R] Control the variable order after multiple declarations using within

2019-07-03 Thread Kevin Thorpe
> On Jul 3, 2019, at 3:15 AM, Sebastien Bihorel > wrote: > > Hi, > > The within function can be used to modify data.frames (among other objects). > One can even provide multiple expressions to modify the data.frame by more > than one expression. However, when new variables are created, the

Re: [R] rounding off problem.....

2019-03-08 Thread Kevin Thorpe
I'm no expert in R internals or floating point computation, however, two things come to mind. First, I suspect the exact value is stored. It is just the printing that looks rounded. That is likely because 0.001 completely dominates the rest. To print in full precision, you would need over 200 d

Re: [R] Importing SAS datasets into R efficiently

2018-10-19 Thread Kevin Thorpe
email: kevin.tho...@utoronto.ca  Tel: 416.864.5776  Fax: 416.864.3016 From: Kevin Thorpe Sent: Friday, October 19, 2018 12:30 PM To: Bert Gunter; Marc Schwartz Subject: Re: [R] Importing SAS datasets into R efficiently   Related to Marc's suggestion, if you have SAS on the same computer

Re: [R] Using write.csv as a connection for read.csv

2018-07-09 Thread Kevin Thorpe
Lana School of Public Health University of Toronto email: kevin.tho...@utoronto.ca  Tel: 416.864.5776  Fax: 416.864.3016 From: Jeff Newmiller Sent: Monday, July 9, 2018 1:01 PM To: r-help@r-project.org; Kevin Thorpe; R Help Mailing List Subject: Re: [R] Using write.csv as a connection f

Re: [R] Using write.csv as a connection for read.csv

2018-07-09 Thread Kevin Thorpe
p on behalf of Kevin Thorpe Sent: Monday, July 9, 2018 11:17 AM To: Eric Berger Cc: R Help Mailing List Subject: Re: [R] Using write.csv as a connection for read.csv   Although your suggestion to provide the data is excellent and one I typically agree with, they data are currently unpublished a

Re: [R] Using write.csv as a connection for read.csv

2018-07-09 Thread Kevin Thorpe
to.ca Tel: 416.864.5776 Fax: 416.864.3016 From: Eric Berger Sent: Monday, July 9, 2018 10:51:38 AM To: Kevin Thorpe Cc: R Help Mailing List Subject: Re: [R] Using write.csv as a connection for read.csv Hi Kevin, It's good that you provided the background to the

[R] Using write.csv as a connection for read.csv

2018-07-09 Thread Kevin Thorpe
Hi. I have some data frames I created previously that seem to not be working correctly anymore. I *think* the problem is that some of the variables in the data frame are of a type called labelled. There are other attributes in the data frame as well. I thought that the easiest way to fix this w