Re: [R] install.packages and package dependencies

2025-02-13 Thread Roger Bivand via R-help
ssible rule tightening in R-devel. Hope this helps, Roger -- Roger Bivand Emeritus Professor Norwegian School of Economics Postboks 3490 Ytre Sandviken, 5045 Bergen, Norway roger.biv...@nhh.no __ R-help@r-project.org mailing list -- To UNSUBSCRIBE a

Re: [R] Save spatial data in a csv file

2024-12-05 Thread Roger Bivand via R-help
vert WKT back to geometries. For more details on the CSV driver for st_write, please see https://gdal.org/en/stable/drivers/vector/csv.html#vector-csv Maybe following up on the R-sig-geo list would be helpful if clarification is needed. Roger -- Roger Bivand Emeritus Professor Norwegian School of E

Re: [R] How to install rgeoda in R

2024-11-11 Thread Roger Bivand
://github.com/eddelbuettel/bh/issues/101 suggests that others have also had difficulty limiting the vendoring to the failing component of the Boost headers. Roger -- Roger Bivand Emeritus Professor Norwegian School of Economics Postboks 3490 Ytre Sandviken, 5045 Bergen, Norway roger.biv...@nhh.no

[R] Fwd: effects() extractor for a quantile reqression object: error message

2024-09-06 Thread Koenker, Roger W
Apologies, forgot to copy R-help on this response. Begin forwarded message: From: Roger Koenker Subject: Re: [R] effects() extractor for a quantile reqression object: error message Date: September 6, 2024 at 8:38:47 AM GMT+1 To: "Christopher W. Ryan" Chris, This was intended

Re: [R] nc file

2024-06-05 Thread Roger Bivand
-geo mailing list: https://stat.ethz.ch/mailman/listinfo/r-sig-geo. Hope this helps, Roger -- Roger Bivand Emeritus Professor Norwegian School of Economics Postboks 3490 Ytre Sandviken, 5045 Bergen, Norway roger.biv...@nhh.no __ R-help@r-project.org

Re: [R] rgdal archived (was: text)

2024-04-29 Thread Roger Bivand
screenshots to this list, the list uses plain text only. Hope this clarifies, Roger -- Roger Bivand Emeritus Professor Norwegian School of Economics Postboks 3490 Ytre Sandviken, 5045 Bergen, Norway roger.biv...@nhh.no -- Date

[R] [R-pkgs] maptools, rgdal, rgeos and rgrass7 retiring Monday, October 16

2023-10-03 Thread Roger Bivand
packages may be found on https://github.com/r-spatial/evolution/tree/main/backstore. Please raise questions by replying to this post, or as issues on https://github.com/r-spatial/evolution. -- Roger Bivand Emeritus Professor Norwegian School of Economics Postboks 3490 Ytre Sandviken, 5045 Bergen

[R] [R-pkgs] sp 2.0-0 released

2023-06-24 Thread Roger Bivand
planned archiving of the retiring packages: maptools, rgdal and rgeos in October 2023. This version issues invasive start-up messages in order to alert users to impending changes; maintainers of affected packages have already been warned. -- Roger Bivand Emeritus Professor Norwegian School of

[R] [R-pkgs] Retirement/archiving of rgdal, rgeos and maptools October 2023

2023-04-10 Thread Roger Bivand
the project materials, raise an issue on https://github.com/r-spatial/evolution/issues or email me (issue better, less likely to be overlooked). -- Roger Bivand Emeritus Professor Department of Economics, Norwegian School of Economics, Postboks 3490 Ytre Sandviken, 5045 Bergen, Norway. e-mail

[R] USB devices?

2021-09-26 Thread Roger Coppock
How do I communicate directly with USB devices in R? Specifically, I want to read data from this device. http://www.zyaura.com/products/ZGm05.asp I have the USB message formats it uses, and they are quite simple. - - Roger Coppock, rcopp...@cox.net

[R] Mediation analysis takes up all RAM, then all swap, and then RStudio/terminal suddenly closes

2021-06-22 Thread Philips Roger
I am using the mediation package to run a mediation analysis. But when I call the `mediate` function, R eats up all RAM, then it eats up all swap, and then RStudio suddenly closes. The same happens if I call `Rscript` from the terminal, and the t

[R] CentOS 8: installing R

2021-05-24 Thread Roger Bos
for openblas-devel. Could some help me get past this issue? Thanks in advance, Roger [RCOAdmin@usd1sapp101 ~]$ sudo dnf install R CentOS-8 - PowerTools 14 kB/s | 4.3 kB 00:00 Extra Packages for Enterprise Linux Modular 8 - x86_64

Re: [R] Stata/Rstudio evil attributes

2021-04-10 Thread Koenker, Roger W
Wolfgang, Thanks, this is _extremely_ helpful. Roger > On Apr 10, 2021, at 11:59 AM, Viechtbauer, Wolfgang (SP) > wrote: > > Dear Roger, > > The problem is this. qss() looks like this: > > if (is.matrix(x)) { > [...] > } > if (is.vector(x)) { >

[R] Stata/Rstudio evil attributes

2021-04-10 Thread Koenker, Roger W
;) #D <- with(Ddta, data.frame(y = access_merg, x = meannets_allhh, z = meanhh)) #save(D, file = "D.Rda") con <- url("http://www.econ.uiuc.edu/~roger/research/data/D.Rda";) load(con) # If I purge the Stata attributes in D: A <- as.matrix(D) B <- as.data.frame(A) # This work

Re: [R] [External] Re: mpfr function in Rmpfr crashes R

2021-03-07 Thread Roger Bos
Richard, Yes, I am on an M1, sorry I didn't mention it. Sounds like I just have to wait a bit until the problem is fixed in Rosetta2 (whatever that is). Thanks for bringing this to my attention. Roger On Sun, Mar 7, 2021 at 1:33 PM Richard M. Heiberger wrote: > this is probably

[R] mpfr function in Rmpfr crashes R

2021-03-07 Thread Roger Bos
ittr_2.0.1tibble_3.0.6 crayon_1.4.0 pkgconfig_2.0.3 ellipsis_0.3.1 [46] prettyunits_1.1.1 httr_1.4.2assertthat_0.2.1 R6_2.5.0 compiler_4.0.3 19:05:52 > Thanks, Roger [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] build a literature database

2020-11-04 Thread Koenker, Roger W
You might also want to take a look at this survey: https://ropensci.org/technotes/2020/05/07/rmd-citations/ > On Nov 4, 2020, at 9:22 AM, John wrote: > > Hi, > > I 'd like to create a table for literature review. Is there any good > data structure (database) I may use? Now I just use a simp

Re: [R] formula mungeing

2020-10-23 Thread Koenker, Roger W
{ > e <- eval(e, list(...)) >} >if (length(e) > 1) for (i in 1:length(e)) e[[i]] <- Recall(e[[i]], ...) >} >e > } > > g(f, lambdas = 2:3) > ## y ~ qss(x, lambda = 2L) + qss(z, 3L) + s > > On Fri, Oct 23, 2020 at 9:33

[R] formula mungeing

2020-10-23 Thread Koenker, Roger W
Suppose I have a formula like this: f <- y ~ qss(x, lambda = lambdas[1]) + qss(z, lambdas[2]) + s I’d like a function, g(lambdas, f) that would take g(c(2,3), f) and produce the new formula: y ~ qss(x, lambda = 2) + qss(z, 3) + s For only two qss terms I have been using

Re: [R] jitter-bug? problematic behaviour of the jitter function

2020-09-24 Thread Koenker, Roger W
FWIW, there is a similar function called “dither” in the quantreg package. > On Sep 24, 2020, at 8:08 AM, Martin Keller-Ressel > wrote: > > Dear Duncan, Dear Rui, > > thanks for the responses and for pointing out that it is the ‚fuzz‘ part that > is causing the problem. I agree that this is n

Re: [R] formula wrangling

2020-09-21 Thread Koenker, Roger W
X <- cbind(X, xss[[i]]) # Here is the problem } } > On Sep 21, 2020, at 9:52 AM, Koenker, Roger W wrote: > > I need some help with a formula processing problem that arose from a > seemingly innocuous request > that I add a “subset” argument to the additive m

[R] formula wrangling

2020-09-21 Thread Koenker, Roger W
. Thanks, Roger fit <- function(formula, subset, data, ...){ call <- match.call() m <- match.call(expand.dots = FALSE) tmp <- c("", "formula", "subset", "data") m <- m[match(tmp, names(m), nomatch = 0)] m[[1]] <- a

Re: [R] Looping through a dataframe

2020-07-21 Thread Roger Bos
, but .N gives you the number of observations and when using data.table (unike data.frames) you can use the column name directly in the 'by' parameter with needing to append the name of the R object or use quotes. Obviously this is just one of many ways to do what you are asking. HTH, Rog

Re: [R] My dream ...

2020-05-11 Thread Koenker, Roger W
Definitely a fortune: "the advantage of computers is not Artificial Intelligence, but rather Artificial Patience" Greg Snow in response to a question about automated R-analysis. Roger Koenker r.koen...@ucl.ac.uk<mailto:r.koen...@ucl.ac.uk> Honorary Professor of Economics Departm

Re: [R] CRAN library down? - UPDATE

2020-05-02 Thread Roger Coppock
y have the Coronavirus? - - Roger Coppock (rcopp...@cox.net) > On May 1, 2020, at 9:24 AM, Roger Coppock wrote: > > After I changed to Version R version 4.0.0 (2020-04-24) -- "Arbor Day" on my > MacBook running Mac OS 10.13.6, I lost all my loaded libraries. Also, the > pac

[R] CRAN library down?

2020-05-01 Thread Roger Coppock
he package installer can contact "BioConductor", however. I am now specifically looking for "HURDAT" and "lmtest", which were on CRAN but not "BioConductor". - - Roger Coppock (rcopp...@cox.net) __ R-help@r-project.org

Re: [R] Summary Table for Quantile Regression for Complex Survey

2019-07-16 Thread Koenker, Roger W
try summary(newer, se = “nid”) Roger Koenker r.koen...@ucl.ac.uk<mailto:r.koen...@ucl.ac.uk> Department of Economics, UCL London WC1H 0AX. On Jul 16, 2019, at 2:46 AM, Mavra Ahmed mailto:mavz.ah...@utoronto.ca>> wrote: Hello All, I am running quantile regression for a co

[R] error when installing zoo package on macos: file 'DESCRIPTION' does not exist

2019-05-30 Thread Roger Bos
I was able to upgrade to the latest version of the zoo package on my linux machine, but my mac is given an error message that the DESCRIPTION does not exist. I am sure that is not the real problem, but I don't know how to debug or figure out what the real problem is. The output is below and my se

Re: [R] particle count probability

2019-02-20 Thread Roger Koenker
Somewhere, buried in the vast literature on the Wicksell problem, there is probably an answer, or at least a hint. > On Feb 20, 2019, at 11:16 AM, PIKAL Petr wrote: > > Dear all > > Sorry, this is probably the most off-topic mail I have ever sent to this help > list. However maybe somebody

Re: [R] Siegel nonparametric regression / mblm package

2019-02-11 Thread Roger Koenker
regards. > > P.S.: sorry for my bad english... > > Il giorno lun 11 feb 2019 alle ore 12:54 Roger Koenker <mailto:rkoen...@illinois.edu>> ha scritto: > My first thought was also that this was an artifact of the ties, but > dithering the data > n <- length(child) &

Re: [R] Siegel nonparametric regression / mblm package

2019-02-11 Thread Roger Koenker
My first thought was also that this was an artifact of the ties, but dithering the data n <- length(child) child <- child + runif(n,-.5,.5) parent <- parent + runif(n,-.5,.5) and rerunning yields the same discrepancy between the Siegel and other fits. Curiously, both lmsreg and ltsreg from MASS

Re: [R] Summarizing R script

2018-09-26 Thread Roger Koenker
I use R CMD BATCH foo which produces a file called foo.Rout and provided the script includes sessionInfo() constitutes a quite sufficient summary for my purposes, it isn’t exactly pretty, but it is informative. > On Sep 26, 2018, at 3:00 PM, Spencer Brackett > wrote: > > R users, > > Is any

Re: [R] Scaling - does it get any better results than not scaling?

2018-07-17 Thread Roger Koenker
In certain fields this sort of standardization has become customary based on some sort of (misguided) notion that it induces “normality.” For example, in anthropometric studies based on the international Demographic and Health Surveys (DHS) childrens’ heights are often transformed to Z-scores pr

Re: [R] Package 'data.table' in version R-3.5.0 not successfully being installed

2018-04-27 Thread Bos, Roger
es all the work for you. Thanks, Roger -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Fox, John Sent: Friday, April 27, 2018 9:21 AM To: Akhilesh Singh Cc: r-help mailing list Subject: Re: [R] Package 'data.table' in version R-3.5.0 not succ

[R] The R Journal, Volume 9, Issue 2

2018-01-29 Thread Roger Bivand
other supplementary matter from landing pages. Many thanks to all contributors - especially reviewers and authors. Best wishes, Roger -- Roger Bivand Department of Economics, Norwegian School of Economics, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; e-mail: roger.biv

Re: [R] Lattice Histogram Scaling

2017-08-15 Thread Roger Koenker
My apologies, the data can now be found at: url <- "http://www.econ.uiuc.edu/~roger/research/ebayes/velo.d"; x <- scan(url,skip = 1) If I could get each of the histograms to mimic what is produced by hist(x, 100, freq = FALSE) I’ve experimented with xlim, ylim, without succes

[R] Lattice Histogram Scaling

2017-08-14 Thread Roger Koenker
to think is less silly. Many thanks, Roger require(REBayes) # Source for the velo data require(lattice) x <- velo x <- x[!(x == 0)] bandwidths <- (1:4)*10 lp <- histogram(~x|bw, nint = 100, border = grey(.9), col = grey(.9), type = "density", panel = funct

[R] The R Journal, Volume 9, Issue 1

2017-07-01 Thread Roger Bivand
Dear all, The latest issue of The R Journal is now available at: https://journal.r-project.org/archive/2017-1/. Many thanks to all contributors - especially reviewers and authors. Regards, Bettina -- Roger Bivand Department of Economics, Norwegian School of Economics, Helleveien 30, N-5045

Re: [R] I cannot run R.EXE or RSCRIPT.EXE

2017-05-05 Thread Bos, Roger
Dominik, Folders with spaces can be very tricky sometimes. In my case single quotes didn't work, but double quotes did (see my example below). Adding the full path to your PATH variable with eliminate the need to specify the full path, making it much easier. Thanks, Roger Micr

Re: [R] Help with a specific quantile regression problem

2017-02-24 Thread Roger Koenker
. url:www.econ.uiuc.edu/~rogerRoger Koenker emailrkoen...@uiuc.eduDepartment of Economics vox: 217-333-4558University of Illinois fax: 217-244-6678Urbana, IL 61801 > On Feb 24, 2017, at 5:10 AM, Helio Santana >

Re: [R] selecting colors to be used in a plot

2017-01-25 Thread Bos, Roger
Thanks Richard. That worked beautifully! -Original Message- From: Richard M. Heiberger [mailto:r...@temple.edu] Sent: Wednesday, January 25, 2017 12:58 PM To: Bos, Roger Cc: R Help R Subject: Re: [R] selecting colors to be used in a plot This package uses a nonstandard name colorset

[R] selecting colors to be used in a plot

2017-01-25 Thread Bos, Roger
My specific question relates to function charts.PerformanceSummary in package PerformanceAnalytics, but the underlying problem is probably with base plot. In this sample code we see a chart with 10 groupings. Apparently 10 groupings is bigger than the number of default colors (8), so red and bl

[R] Re: OS X solution... was Re: rgdal functions: spTransform and CRS not working

2017-01-16 Thread Roger Bivand
X-specific questions like this, you could try R-sig-mac, for spatial data R-sig-geo. Always show the output of sessionInfo() when reporting issues. -- Roger Bivand Department of Economics, Norwegian School of Economics, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; e-mail: roge

Re: [R] getting data from a webpage

2016-12-19 Thread Bos, Roger
Glenn, R Studio did a webinar on Web Scraping using the rvest package that made it look really easy. I haven't gotten around to using it yet, but the video should be on their website somewhere. The link below is the PDF of the slides. It should be education and will probably give you what yo

Re: [R] weighted regression inside FOREACH loop

2016-10-07 Thread Bos, Roger
. Thanks again for your help! Roger This message and any attachments are for the intended recipient’s use only. This message may contain confidential, proprietary or legally privileged information. No right to confidential or privileged treatment of this message is waived or lost by an error in

Re: [R] weighted regression inside FOREACH loop

2016-10-07 Thread Bos, Roger
riginal Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Bos, Roger Sent: Friday, October 07, 2016 9:25 AM To: R-help Subject: [R] weighted regression inside FOREACH loop I have a foreach loop that runs regressions in parallel and works fine, but when I try to add the w

[R] weighted regression inside FOREACH loop

2016-10-07 Thread Bos, Roger
I have a foreach loop that runs regressions in parallel and works fine, but when I try to add the weights parameter to the regression the coefficients don’t get stored in the “models” variable like they are supposed to. Below is my reproducible example: library(doParallel) cl <- makeCluster(4)

Re: [R] problems reading XML type file from ishares website

2016-07-29 Thread Bos, Roger
e) xml_data <- xmlToList(xmlfile) datadate <- unlist(xml_data[["Worksheet"]][[1]])[1] d <- list() for (ii in 10:length(xml_data[["Worksheet"]])) { rd <- unlist(xml_data[["Worksheet"]][[ii]]) d[[ii]

[R] problems reading XML type file from ishares website

2016-07-28 Thread Bos, Roger
: Style line 14 and Style Thanks in advance, Roger This message and any attachments are for the intended recipient's use only. This message may contain confidential, proprietary or legally privileged information. No right to confidential or privileged treatment of this message is waived

Re: [R] dissolve tiny polygons to others with unionSpatialPolygons{maptools}

2016-06-06 Thread Roger Bivand
o dissolve slivers gets a fair number of hits. There is always also the upstream question of where the slivers came from, and whether the resolution is not in the earlier process - generate a map without slivers that says exactly what you mean, rather than fudging it afterwards. Roger

Re: [R] Map of Europe at NUTS 2 Level

2016-03-11 Thread Roger Bivand
lim=, ylim= to exclude these, or select based on knowing their NUTS2 codes: plot(nuts2a, axes=TRUE, xlim=c(-11.62699, 19.20174), ylim=c(34.35470, 52.04182)) Roger PS. One gets more, and more rapid replies to this kind of question on R-sig-geo. > > This does produce a plot but its rather &#

Re: [R] Functional programming?

2016-03-02 Thread Roger Koenker
rying to do. As always the knowledge and generosity of the R-help community is inspiring. url:www.econ.uiuc.edu/~roger Roger Koenker emailrkoen...@uiuc.eduDepartment of Economics vox: 217-333-4558University of Illinois fax: 217-244

Re: [R] Functional programming?

2016-03-02 Thread Roger Koenker
Thanks, Duncan and Bert, Duncan’s version does replicate my result, Bert’s does something a bit different, now I just need some time to digest what you have done, and try to see how and why. Many thanks!!! Roger url:www.econ.uiuc.edu/~rogerRoger Koenker emailrkoen

[R] Functional programming?

2016-03-02 Thread Roger Koenker
t;- function(x) {force(i); return(h[[i]] (x))} } x <- 1:99/10 plot(x, h[[1]](x), type = "l") for(i in 2:5) lines(x, h[[i]](x), col = i) Thanks, Roger __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more

Re: [R] rgrass7 problem

2016-02-27 Thread Roger Bivand
h more informative - we can guess that you are using GRASS 7 (but not which release) and rgrass7 (not which version), but have no idea of your OS, or of other output of sessionInfo() in R. Do not post HTML-formatted - plain text is preferred. Roger > > Thank you. > > *___

Re: [R] GIS Analyses for Economics and Marketing

2016-02-23 Thread Roger Bivand
terials are mostly related to environmental questions, but the techniques used are similar. Roger > Can someone help me with some tutorials, training materials or course > examples in area GIS for Marketing or Economics based on QGIS (with Grass > or any other plugins), and some examples of

Re: [R] algorithmic method quantile regression

2015-10-14 Thread Roger Koenker
Did you read item 1 in the quantreg FAQ()? url:www.econ.uiuc.edu/~rogerRoger Koenker emailrkoen...@uiuc.eduDepartment of Economics vox: 217-333-4558University of Illinois fax: 217-244-6678Urbana, IL 61801 > On Oct

Re: [R] quantile regression: warning message

2015-10-13 Thread Roger Koenker
see the output from the quantreg FAQ: FAQ() especially point 2. url:www.econ.uiuc.edu/~rogerRoger Koenker emailrkoen...@uiuc.eduDepartment of Economics vox: 217-333-4558University of Illinois fax: 217-244-6678

Re: [R] Attaching a pdf file to an email generated with sendmailR?

2015-10-09 Thread Bos, Roger
newwd %+% fnameNotes [1] "//rinnycs0051/research/R_HOME_Research/Markdown/morningNotes/morningNotes_20151009.html" > fnameNotes [1] "morningNotes_20151009.html" Thanks, Roger *** This message and any attachm

Re: [R] Quantile Regression without intercept

2015-10-07 Thread Roger Koenker
me implies 0 expenditure, then all (quantile) Engel curves pass through the origin and one might want to impose this. On the other hand maybe not... > From: Roger Koenker > Sent: ‎06-‎10-‎2015 07:09 PM > To: Lorenz, David > Cc: r-help@r-project.org > Subject: Re: [R] Quantile R

Re: [R] Quantile Regression without intercept

2015-10-06 Thread Roger Koenker
do I interpret the line? As an estimate of the conditional median (quantile) function when constrained to pass through the origin… as with least squares fitting without an intercept, you do this at your peril. > > > On Tue, Oct 6, 2015 at 8:03 AM, Roger Koenker wrote: > > >

Re: [R] Quantile Regression without intercept

2015-10-06 Thread Roger Koenker
> On Oct 6, 2015, at 7:58 AM, Lorenz, David wrote: > > Did you verify that the correct percentages were above/below the regression > lines? I did a quick check and for example did not consistently get 50% of > the observed response values greater than the tau=.5 line. I did when I > included the

Re: [R] Quantile Regression without intercept

2015-10-05 Thread Roger Koenker
as for lm() or any other linear model fitting…. rq( y ~ x - 1, … ) url:www.econ.uiuc.edu/~rogerRoger Koenker emailrkoen...@uiuc.eduDepartment of Economics vox: 217-333-4558University of Illinois fax: 217-244-6678

Re: [R] Function stslshac {sphet}: heteroskedasticity and autocorrelation consistent (HAC) estimator

2015-09-19 Thread Roger Bivand
using a built-in data set, then your intentions would be clearer. ... > I would be grateful for any reaction. > > Monika > PS. Please post plain text, not HTML Roger Bivand __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more,

[R] Manova: Data similarly generated are significantly different.

2015-09-04 Thread Roger Xu
Dear R users, Hi. I don't know if my understanding of Manova test is correct. So I test with the following code and got strange results. Any help would be appreciated. y0, y1, and y2 are independently generated by the same method. They are each split into 20 groups by the same method. The summa

Re: [R] spatial estimation

2015-09-03 Thread Roger Bivand
s(Q ~ P + D, ~ D + F + A, data=Kmenta)) which explains why I asked for a publication providing something which doesn't spring naturally from the estimation method. Roger Bivand > Thanks for your answer, > > Regards > __ R-help@r-project.

Re: [R] Running R in Server

2015-08-18 Thread Bos, Roger
port using RMarkdown and host that on the website. If you really need a web app, I suggest looking into Shiny. You can make a shiny app, host it for free on the cloud. You will have a lot to learn, but it will be time well spent. https://www.rstudio.com/ Than

[R] using dcast with a function of multiple arguments

2015-07-20 Thread Bos, Roger
y expect that to work, but without an example I don't know what else to try. Any hints would be greatly appreciated. Thanks, Roger *** This message and any attachments are for the intended recipient's use only. This message ma

Re: [R] advice on making HTML tables

2015-07-14 Thread Bos, Roger
Answering my own question, I was able to make the tables look better in IE using some simple CSS: td { padding: 6px; } -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Bos, Roger Sent: Tuesday, July 14, 2015 11:36 AM To: r-help@r-project.org

[R] advice on making HTML tables

2015-07-14 Thread Bos, Roger
This might be a little off topic, but I am starting to produce some HTML reports that contain mostly tables and they look great in Chrome but really bad in IE, so I wanted to see if anyone knows of a better way or an easy fix. One option I have used is to convert to PDF, but sometimes it is nic

[R] as.numeric looses precision

2015-07-02 Thread Bos, Roger
umeric(p, digits=6) [1] 1087.003 I would be nice if I could keep all the decimal places after the conversion. Thanks, Roger *** This message and any attachments are for the intended recipient's use only. This message may

Re: [R] Boxplot using a shapefile

2015-06-16 Thread Roger Bivand
p://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example > - ... and please read the posting guide and don't post in HTML. > Definitely! And note that this is a question that is better suited to the R-sig-geo list. Hope this clarifies, Roger > B. > >

Re: [R] Quantile regression model with nonparametric effect and interaction

2015-06-11 Thread Roger Koenker
The main effect trend seems rather dangerous, why not just estimate the f’s in a loop? url:www.econ.uiuc.edu/~rogerRoger Koenker emailrkoen...@uiuc.eduDepartment of Economics vox: 217-333-4558University of Illinois fax: 217-244-6678

Re: [R] R convert pdf/png to html

2015-06-03 Thread Bos, Roger
example, but if you want to produce HTML output in the future, it is good to know: http://rmarkdown.rstudio.com/ Thanks, Roger *** This message and any attachments are for the named person's use only. This message may co

Re: [R] Plot by FIPS Code using Shapefiles

2015-05-06 Thread Roger Bivand
Corey Sparks utsa.edu> writes: > > Joining data the way you're doing it is dangerous, Roger Bivand and others > describes a standard way to do this process here: > http://r-sig-geo.2731867.n2.nabble.com/Merging-shapefiles-and-csv-td7586839.html Quite right - the chunks C

[R] problem setting default timezone

2015-04-23 Thread Bos, Roger
Period %+% ".txt")$mtime, > tz='America/New_York') [1] "2015-04-21" But my question is why is the as.Date function not using the timezone I have set? Thank you in advance, Roger *** This message and any

Re: [R] rgdal installation with two versions of GDAL

2015-04-22 Thread Roger Bivand
until GDAL 2 stabilises? Neither your motivation nor your affiliation are very convincing. Please never post HTML-formatted mail. Roger > > So, the question is, how to I convince R to use the new library search > path? I'm on xubuntu, and R is installed using apt. &

Re: [R] evaluating spatial autocorrelation in a raster

2015-03-14 Thread Roger Bivand
To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. Please do provide a self-contained example. Roger ___

Re: [R] R crashes when I run rgeos::gDistance

2015-03-03 Thread Roger Bivand
e you avoid relying on upstream packaging. This will however interfere with other software that may depend on your existing GEOS. > > Please let me know if any additional information would be helpful. > > Thank you for your time, > > Adrian > > [[alternative HTML version

[R] Reading in an XLS (really XML) file from website

2015-02-27 Thread Bos, Roger
e 14 and Style Error: 1: Opening and ending tag mismatch: Style line 14 and Style Thanks in advance for any help or hints, Roger *** This message and any attachments are for the named person's use only. This message may contain co

[R] "se.fit" option to the predict.nls() function

2015-01-05 Thread Roger Coppock
When will "R" implement the "se.fit" option to the predict.nls() function? Is there some schedule? __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://

Re: [R] Overlay two shapefiles in same map axes rgdal/maptools

2014-11-18 Thread Roger Bivand
Zilefac Elvis yahoo.com> writes: > > Hello, > > I have two spatial map objects (reproducible example further down) > which I would like to overlay in R. The > ESRI shapefiles were read using: > The reproduction of the data didn't work with dput(). > library(rgdal) > Prairie.Boundaries <- r

Re: [R] quantreg speed

2014-11-16 Thread Roger
You could try method = "pin". Sent from my iPhone > On Nov 16, 2014, at 1:40 AM, Yunqi Zhang wrote: > > Hi William, > > Thank you very much for your reply. > > I did a subsampling to reduce the number of samples to ~1.8 million. It > seems to work fine except for 99th percentile (p-values f

Re: [R] Distance matrix for Spatial Filtering {spdep}

2014-11-09 Thread Roger Bivand
odel. Are you sure that the model you are starting from is well-specified (included variables and their functional forms)? If not, you risk including many eigenvectors that simply mop up other misspecifications. This search will be very time-consuming. Consider using the R-sig-geo list, which

[R] better two column output from rmarkdown

2014-11-05 Thread Bos, Roger
Disclaimer: This question is more about HTML than R, but since I am using rmarkdown, I am not sure of a better forum to ask this. The code example below produces two column HTML output. If you run the example you will see that the "" paragram starts off at the bottom of the first column an

Re: [R] Workaround for RODBC asymmetric numeric data treatment

2014-10-03 Thread Bos, Roger
packages to get fPortfolio to load. Anyone know why install.packages("fPortfolio",repos="http://R-Forge.R-project.org";) can't install all the dependencies automatically? Thanks, Roger > library(RODBC) > library(fPortfolio) Loading required package: timeSeries

Re: [R] Copying tables from R to Excel

2014-09-23 Thread Bos, Roger
Here is a simple method I saw mentioned on this list a few years ago: toExcel <- function(x, tag=FALSE) {write.table(x, "clipboard-128", sep="\t", row.names=tag)} *** This message and any attachments are for the named person's use on

Re: [R] How to use multi paragraph comment like /* and */ in cpp?

2014-09-09 Thread Bos, Roger
What I do in cases like that is wrap the code in a FALSE statement so it won't get executed: its easy to add and remove as needed. If (FALSE) { ...Code to exclude } *** This message and any attachments are for the named person'

Re: [R] Making my own graphics device

2014-08-17 Thread Roger Koenker
In ancient times, ie circa 1981, the S language certainly supported HP pen plotters so there should be code somewhere that could be resuscitated, he said naively. url:www.econ.uiuc.edu/~rogerRoger Koenker emailrkoen...@uiuc.eduDepartment of Economics vox: 217

Re: [R] Prediction intervals (i.e. not CI of the fit) for monotonic loess curve using bootstrapping

2014-08-13 Thread Roger Koenker
quite straightforward, although the theory for such bands is rather difficult and still under construction. url:www.econ.uiuc.edu/~roger Roger Koenker emailrkoen...@uiuc.eduDepartment of Economics vox: 217-333-4558University of Illinois fax:

Re: [R] Mapping

2014-06-06 Thread Roger Bivand
to look for CRAN Task Views, and in your case the Spatial one is probably the most helpful, as it gives a dense overview to start from. Also look at the R-bloggers aggregation service, for example blogs by Oscar Perpigñán or James Cheshire, and others. The examples will vary a lot depending

Re: [R] Spatial Quantile Regression: Extracting residuals

2014-05-20 Thread Roger Bivand
4] "Coef." "Std. Err." "Z-Values" "Pr(>|z|)" so that apart from the coefficient values and their distribution summaries, nothing else is returned. This means that you will have to put qregspiv into debug() mode, and manipulate those internal objects that yo

Re: [R] MRF smoothers in MGCV - specifying neighbours

2014-05-08 Thread Roger Bivand
but NEIGNO is numeric. It appears that the ID variable should be numeric (or integer), but that the names of the list of neighbour vector should be character, but otherwise match. The call tree is not simple; the error seems to occur in mgcv:::ExtractData. Hope this helps, Roger > > Howe

Re: [R] R 3.1 changes to type.convert causing strings where I used to get numeric

2014-05-01 Thread Bos, Roger
Duncan, Yes, I admit I haven't updated since 2.15.2 so I was behind. I am seeing the same problem with reading from RODBC (sql server) tables. I write data to a table and then read it back. In R 2.15 it would come in numeric. Under R 3.1 it comes in as a string. Thanks,

[R] R 3.1 changes to type.convert causing strings where I used to get numeric

2014-04-30 Thread Bos, Roger
Dear R-help, I recently upgraded to R 3.1 patched and code that ran fine previously and now giving a lot of errors because the data is coming in as strings instead of numeric. I can fix my code to wrapping each item I want to use with as.numeric(), but that seems very inefficient. I looked at

Re: [R] trouble using readOGR() function

2014-04-03 Thread Roger Bivand
kely the upstream software is passing on a geometry problem it hasn't resolved itself. Hope this clarifies, Roger > > Someone would have any idea to solve the "incompatible geometry" error ? > > Thanks for help! > __ R-h

Re: [R] trouble using readOGR() function

2014-04-03 Thread Roger Bivand
managed to define in a simple way, and this is where you need to go to resolve the problem. Hope this clarifies, Roger > It seems that the file is read, since I get different parameters on it while > using OGRSpatialRef() or ogrListLayers() > >

Re: [R] dnearneigh::spdep: undesired behaviour with SpatialPoints object: bug or feature? Please confirm.

2014-03-21 Thread Roger Bivand
glat = TRUE) : # dnearneigh: longlat overriden for Spatial object Coercion to SpatialPoints isn't needed - the function looks for objects inheriting from SpatialPoints, so just spdf is sufficient. Bugfix on R-forge at revision 552. Roger > dnearneigh(as(spdf,"SpatialPoints"), 0,

Re: [R] passing variable names to dplyr - SOLVED

2014-01-28 Thread Bos, Roger
All, I asked over at the manipulatr group and Hadley showed me how to do it. In case anyone is interested I will post the solution here: target <- "hp" call <- substitute(mutate(mtcars, scale(target)), list(target = as.name(target))) eval(call) Thanks, Roger -Original M

[R] using substitute with multiple parameters

2014-01-27 Thread Bos, Roger
l <- substitute(select(zidx_df, datadate, target), list(target = > as.name(target))) > call select(zidx_df, datadate, val1) I have tried multiple variations, but none of them are even close, so I won't embarrass myself by posting them here. Thanks in advance, Roger

  1   2   3   4   5   6   >