Re: [R] Sweave

2022-06-26 Thread R. Mark Sharp via R-help
Naresh, First of all thanks for using reporoducible methods. I now use knitr instead of Sweave and the switch was fairly trivial. What you are wanting to do has been supported for a few years within RStudio. I found https://support.rstudio.com/hc/en-us/articles/200552336-Getting-Help-with-R

Re: [R] wanting to count instances of values in each cell of a series of simulated symmetric matrices of the same size

2021-06-01 Thread R. Mark Sharp via R-help
2,3] cell of the matrices; do whatever > you want with them. > > Cheers, > Bert > > > > Bert Gunter > > "The trouble with having an open mind is that people keep coming along and > sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bl

[R] wanting to count instances of values in each cell of a series of simulated symmetric matrices of the same size

2021-06-01 Thread R. Mark Sharp via R-help
I want to capture the entire distribution of values for each cell in a sequence of symmetric matrices of the same size. The diagonal values are all 0.5 so I need only the values above or below the diagonal. A small example with three of the structures I am wanting to count follows: F

Re: [R] File names for mac newby

2020-01-21 Thread R. Mark Sharp via R-help
Open the terminal application in the Utilities folder. Select the file you want to use in R in a Finder window and drag it to the terminal applications command line prompt and then release the file. The absolute path of the file will be entered in the command line of the terminal’s window. Thoug

Re: [R] Increasing number of observations worsen the regression model

2019-05-26 Thread R. Mark Sharp via R-help
Raffa, I ran this on a MacOS machine and got what you expected. I added a call to sessionInfo() for your information. > rm(list=ls()) > N = 3 > xvar <- runif(N, -10, 10) > e <- rnorm(N, mean=0, sd=1) > yvar <- 1 + 2*xvar + e > plot(xvar,yvar) > lmMod <- lm(yvar~xvar) > print(summary(lmMod))

[R] Writing .nc files

2018-08-28 Thread R. Mark Sharp via R-help
Marco, Always post to the r-help list to have a better chance of finding someone that can help. There is a very nice tutorial that you should have found. See http://geog.uoregon.edu/bartlein/courses/geog490/week04-netCDF.html#create-and-write-a-netcdf-file Mark R. Mark Sharp, Ph.D. Data Scient

Re: [R] help

2018-08-10 Thread R. Mark Sharp via R-help
Marco, The error message indicates that nlon*nlat is 420 and that 1378620/420 has a remainder. For the matrix to form, all rows have to be complete. I am guessing you have at least one value incorrect among nlon, nlat, t or the length of fulldatav. Mark R. Mark Sharp, Ph.D. Data Scientist and

Re: [R] Making objects global in a package

2018-07-13 Thread R. Mark Sharp via R-help
I would usually use a function for this. It may not be more R like, but it is more readable to me. If you want, to keep the columns in a file, you could have the function initialize itself on the first call. Mark R. Mark Sharp, Ph.D. Data Scientist and Biomedical Statistical Consultant 7526 Mea