Re: [R] Undocumented behaviour of diag when replacing the diagonal of a matrix?

2024-12-05 Thread Spencer Graves
he entries are no longer the indices of A as a vector. Does this fact make his example work for you? It does for me. Hope this helps. Spencer Graves I guess, Duncan Murdochs hint is crucial. I'll commen

Re: [R] x[0]: Can '0' be made an allowed index in R?

2024-04-22 Thread Spencer Graves
Convert to character: goofy <- 1:9 names(goofy) <- (-4):4 goofy[as.character(0)] goofy["-2"] sg On 4/22/24 10:31 AM, Ebert,Timothy Aaron wrote: You could have negative indices. There are two ways to do this. 1) provide a large offset. Offset <- 30 for (i in -29 to 120) { print(df[

Re: [R] understanding predict.lm

2023-11-06 Thread Spencer Graves
Doh! Thanks very much. sg On 11/6/23 5:17 PM, John Fox wrote: Dear Spencer, You need the t distribution with correct df, not the standard-normal distribution: > pt(-z.confInt/2, df=13)     1 2 3 4 5 6 7 8 9    10    11 0.025 0.025 0.025 0.025 0.025 0.025 0.

[R] understanding predict.lm

2023-11-06 Thread Spencer Graves
with(pred.w.plim, (fit[,3]-fit[,2])/s.pred)) pnorm(-z.predInt/2) ** This gives me 0.01537207. I do not understand why it's not 0.025 with level = 0.95. Can someone help me understand this? Thanks, Spencer Graves __ R-

Re: [R] simulating future observations from heteroscedastic fits

2023-08-31 Thread Spencer Graves
On 8/31/23 1:27 AM, Spencer Graves wrote: Hello, All:   I want to simulate future observations from fits to heteroscedastic data. A simple example is as follows: (DF3_2 <- data.frame(y=c(1:3, 10*(1:3)), gp=factor(rep(1:2, e=3 # I want to fit 4 mod

[R] simulating future observations from heteroscedastic fits

2023-08-30 Thread Spencer Graves
ed(fit21) # How can I do the same with either fit12 and fit22 # or fit12r and fit22r? Thanks, Spencer Graves __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] logLIk(lme(...))?

2023-08-29 Thread Spencer Graves
What I thought should have been a linear operation wasn't. Please excuse the waste of your time. Thanks, Spencer Graves On 8/29/23 11:15 AM, Spencer Graves wrote: Hello, all:   I have a dataset with 2 groups.  I want to estimate 2 means and 2 standard deviatio

[R] logLIk(lme(...))?

2023-08-29 Thread Spencer Graves
)) # Why isn't (ll22 = llGp1+llGp2)? (ll22 - llGp1-llGp2) # And secondarily, how can I get the residual standard deviations # within each gp from fit22? Thanks, Spencer Graves __ R-help@r-project.org mailing list -- To UNS

Re: [R] Book Recommendation

2023-08-28 Thread Spencer Graves
suggest you consider using findFn with SQL and applications of greatest interest to your target audience. Spencer Graves p.s. DISCLAIMER: I'm the lead author and maintainer of the sos package. On 8/28/23 1:48 PM, Hadley Wickham wrote: You might find this chapter of R

Re: [R] Book Recommendation

2023-08-28 Thread Spencer Graves
On 8/28/23 12:47 PM, Bert Gunter wrote: I presume you are familiar with the RSQL and RSQLite packages and their vignettes. Can't offer any help, but a point of clarification: When you say, "teach accomplishing SQL in R," do you explicitly mean using SQL syntax in R to manipulate data or do yo

Re: [R] Questions about R

2023-08-17 Thread Spencer Graves
his article, with good reason. Hope this helps. Spencer Graves On 8/17/23 11:48 AM, Bert Gunter wrote: Incidentally, you might be interested in the banner shown when R starts up: "R is free software and comes with ABSOLUTELY NO WARRANTY." I believe this is standar

Re: [R] Off-topic: ChatGPT Code Interpreter

2023-07-17 Thread Spencer Graves
dramatically by use of appropriate artificial intelligence. Comments? Spencer Graves [1] https://en.wikipedia.org/wiki/Daniel_Kahneman [2] https://en.wikipedia.org/wiki/Behavioral_economics [3] https://www.researchgate.net/publication/26798603_Conditions_for_Intuitive_Expertise_A

Re: [R] plot level, velocity, acceleration with one x axis

2023-05-31 Thread Spencer Graves
X.[, 3], ylab='accel (%)', axes=FALSE) axis(2) box(col='grey') axis(1) Best, Wolfgang That's exactly what I needed. Thanks, Spencer -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Spencer Graves Sent: Wednesday, 31 Ma

Re: [R] plot level, velocity, acceleration with one x axis

2023-05-31 Thread Spencer Graves
t would make it feasible for a user to call axis(2, ...) once for each vertical axis to handle cases where someone wanted to a vertical scale different from linear and log. I'd want to make sure that lines.ts also works with this, because I want to add fits and predictions. Co

Re: [R] plot level, velocity, acceleration with one x axis

2023-05-31 Thread Spencer Graves
b searches have so far failed to produce anything better than modifying plot.ts.R (and then submitting such with compatible changes to plot.ts.Rd), as I suggested earlier. ??? Thanks, Spencer On Tue, May 30, 2023 at 5:45 PM Spencer Graves wrote: On 5/30/23

Re: [R] plot level, velocity, acceleration with one x axis

2023-05-30 Thread Spencer Graves
ab='vel (%)') plot(DAX.[, 3], ylab='accel (%)') This is what I want as three panels of a single plot. I think I could get it by modifying the code for plot.ts so it accepted ylab as a vector, etc., as I previously mentioned. What do you think?

Re: [R] plot level, velocity, acceleration with one x axis

2023-05-30 Thread Spencer Graves
red to produce the default labeling. Then a user who wants a log scale for some but not all variables can get that easily and can further modify any of those scales further if they don't like the default. ??? Thanks very much. Spencer Graves On Tue, May 30

Re: [R] plot level, velocity, acceleration with one x axis

2023-05-30 Thread Spencer Graves
diff(log(DAX)), diff(diff(log(DAX) colnames(logDAX) <- c('logDAX', 'vel', 'accel') plot(logDAX, axes=FALSE) axis(1) axis(2) I'm thinking of creating my own copy of "plot.ts", and changing it so it accepts the "log"

Re: [R] plot level, velocity, acceleration with one x axis

2023-05-29 Thread Spencer Graves
That's it. Thanks. sg HTH, Eric On Mon, May 29, 2023 at 7:57 AM Spencer Graves wrote: Hello, All: I want to plot level, velocity, and acceleration in three panels with only one x axis. The code below does this using "layout". However, I want the three plot areas

[R] plot level, velocity, acceleration with one x axis

2023-05-28 Thread Spencer Graves
es of the three panels changes. There's probably a way to do this with ggplot2, but I have yet to find it. Suggestions? Thanks, Spencer Graves str(AirTime <- as.numeric(time(AirPassengers))) str(AP <- as.numeric(AirPassengers)) def.par <- p

Re: [R] identify the distribution of the data

2023-02-08 Thread Spencer Graves
s of the product. This application to products is less well known and occasionally controversial. https://en.wikipedia.org/wiki/Gibrat%27s_law Spencer Graves 1) Try a simulation. Draw 5 values from a normal distribution, make a histogram. Then do it again. Is it easy

Re: [R] Plotmath isn't working for special characters

2023-01-24 Thread Spencer Graves
ave this behavior. plot(1,1,main=parse(text="x >= y")) Has anyone else seen this? What's your "sessionInfo()"? I got the symbol, not problem. Spencer Graves sessionInfo() R version 4.2.2 (2022-10-31) Platform: x86_64-apple-darwin17.0 (64-bit)

Re: [R] R Certification

2023-01-02 Thread Spencer Graves
king the signature: pkgutil --check-signature R-4.2.2.pkg". Beyond that, RStudio and other companies will happily sell you a maintenance contract, which will get you more polite answers than from a list serve like this ;-) Spencer Graves On 1/2/23 11:24 AM, John Kane wrot

Re: [R] [External] Amazing AI

2022-12-21 Thread Spencer Graves
ing techniques. Let's use the best understandable model, and apply AI to the residuals from that. Then identify the variables that make the largest contributions to a useful AI model, and see if they can be added to the other model. Spencer Graves On Sun, Dec 18, 2022 at 7:01 PM Bori

Re: [R] cannot print a list with cat

2022-10-24 Thread Spencer Graves
1e-12 I don't know what you mean by "main program" vs. "the command t(mycontrol)". ??? Spencer Graves > sessionInfo() R version 4.2.1 (2022-06-23) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Big Sur 11.7 Matrix

Re: [R] ggplot2 install.package

2022-10-10 Thread Spencer Graves
From long and unhappy experience, I routinely reboot before reporting problems like this, then upgrade all software where feasible ... including "update.packages". Some problems magically disappear after doing this. If they persist, then, as it says at the end of each email on this th

Re: [R] Parsing XML?

2022-07-28 Thread Spencer Graves
te was unknown. My contact at the Library of Congress then suggested I parse the XML version. Thanks, Spencer What of this information do you actually want? The elements of the list should be what? On Thu, 28 Jul 2022 at 08:52, Spencer Graves <mailto:spencer.gra...@eff

Re: [R] A humble request

2022-07-03 Thread Spencer Graves
derstand it.   DO ask your supervisor help you to select an alternative,   and if you can't figure that out between you,   ASK a more informative question. On Mon, 4 Jul 2022 at 00:38, John Kane <mailto:jrkrid...@gmail.com>> wrote: Spenser, the idea to source the foncti

Re: [R] A humble request

2022-07-02 Thread Spencer Graves
ubtle, Muhammad can use "debug", as I earlier suggested. Spencer Graves You might find as I did that the wmtsa package has some dependencies that are also archived, namely pkg:splus2R (provided generously by Insightful for many years but apparently no longer) and pkg:ifultools.

Re: [R] A humble request

2022-07-02 Thread Spencer Graves
invite you to walk through the function line by line. You can look at what it does, and change it as you like. Doing so should help you learn R while also making it easier for you to figure out how to make the function do what you want. Hope this helps. Spencer Graves

Re: [R] Is it possible to set a default working directory for all R consoles?

2022-06-17 Thread Spencer Graves
ing Directory". Then when I want to work on an existing project, I can do File > "Recent Projects" in RStudio. Or I can double click on the appropriate *.Rproj file in Finder or Windows Explorer. Hope this helps. Spencer Graves On 6/17/22 10:4

Re: [R] Exact 95% CI around the mean for LogNormal distribution

2022-03-16 Thread Spencer Graves
looks plausibly like a straight line, you are fine with a log-normal assumption. If not, my favorite reference is Titterington, Smith and Makov (1985) Statistical Analysis of Finite Mixture Distributions (Wiley). Hope this helps. Spencer Graves On 3/16/22 5:44 PM, Bert G

Re: [R] Is there a Truth Table Generator in R?

2022-03-12 Thread Spencer Graves
t matches. The second is a summary by package. Hope this helps. Spencer Graves On 3/12/22 10:42 AM, Paul Bernal wrote: Dear friends, Hope you are doing great. I have been searching for a truth table generator in R, but everything I find has a Python implementation inst

Re: [R] Searching for packages

2022-02-28 Thread Spencer Graves
There is also sos::findFn, discussed in a vignette included in that package. When I created that package, I felt it was the fastest literature search for anything statistical: It will identify all help pages that match a search string and sort them by package. It creates an object so rela

Re: [R] nlme::lme sigma parameter standard deviation or variance?

2021-12-18 Thread Spencer Graves
n: Standard deviation, as indicated in help('lmeObject'). Hope this helps. Spencer Graves On 12/18/21 4:00 AM, Eric Berger wrote: You can run a test. Multiply all your data by a scalar, say 2. If this changes the result lme_mod$sigma by a factor of 2, then it i

Re: [R] Date read correctly from CSV, then reformatted incorrectly by R

2021-11-22 Thread Spencer Graves
it can be improved. It's on GitHub in case anyone would like to take the time to suggest improvements: https://github.com/sbgraves237/Ecfun Hope this helps. Spencer Graves On 11/20/21 4:13 PM, Avi Gross via R-help wrote: This seems to be a topic that comes up pe

Re: [R] Date

2021-11-04 Thread Spencer Graves
year 2019. However, if it were "09/06/2019", we would not know if it were September 6 or 9 June of 2019. If it were "09/06/08", we would have the added possibility with the year first, followed by month and day: June 8, 2009. This ambiguity is resolved most forcefully by IS

Re: [R] about L-BFGS-B

2021-08-15 Thread Spencer Graves
g., by giving a more informative error message. Hope this helps, Spencer Graves On 8/15/21 7:26 AM, J C Nash wrote: You have the answer in the error message: the objective function has been calculated as +/-Inf somehow. You are going to have to figure out where the functi

Re: [R] SOS package: findFn does not work

2021-08-07 Thread Spencer Graves
e GitHub version to CRAN. However, it would help me if I understood your configuration and if the GitHub version fixes the problem for you. Thanks for the report. I apologize for the inconvenience. Spencer Graves On 8/7/21 2:57 AM, hp wan wrote: Dear All, Recently, I

Re: [R] Sin curve question

2021-07-24 Thread Spencer Graves
plot(sin, to=pi) # also works but with x labeled in radians. # With x axis labeled in degrees plot(sin, to=pi, axes=FALSE) axis(2) lbls <- seq(0, 180, 30) axis(1, pi*lbls/180, lbls) This can probably be done in ggplot2, but I don't know how off the top of my head. Hope this he

Re: [R] MAC version 10

2021-07-08 Thread Spencer Graves
What web site did you go to? Have you tried: https://cran.r-project.org/bin/macosx/ Then click on "R-4.1.0.pkg". That should download as normal. Then double click on that, etc. Spencer Graves On 7/6/21 3:52 PM, Farrah T wrote: Hello, I have Mac

[R] input string ... cannot be translated to UTF-8, is it valid in 'ANSI_X3.4-1968'?

2021-04-22 Thread Spencer Graves
)" and detailed instructions below on the precise file I dowloaded from the web and tried to read. I may be able to get what I want just ignoring this. However, I'd like to know how to fix this. Thanks, Spencer Graves sessionInfo() R version 4.0.5 (2021-03-

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

2021-03-19 Thread Spencer Graves
two meanings. It can mean the numerically accurate p-value as Bogdan asked in his first email, or it could mean the p-value calculated from the exact distribution of the statistic(In this case, U stat). These two are actually not related, even though they all called "exact". Best, Jiefei On Fri

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

2021-03-19 Thread Spencer Graves
gt;> >>>> I thinnk the answer is much simpler. The print method for hypothesis >>>> tests (class htest) truncates the p-values. In the above example, >>>> instead of using >>>> >>>> wilcox.test(rnorm(100), rnorm(100, 2), exact=TRUE) >>&g

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

2021-03-18 Thread Spencer Graves
asking makes sense:  There is is no such thing as an "exact p value" except to the extent that certain assumptions hold, and all models are wrong (but some are useful), as George Box famously said years ago.[1]  Truth only exists in mathematics, and that's because it's a fict

Re: [R] Very slow optim()

2021-03-13 Thread Spencer Graves
Hi, Deepayan: On 2021-03-13 01:27, Deepayan Sarkar wrote: On Sat, Mar 13, 2021 at 10:08 AM Spencer Graves wrote: TWO COMMENTS: 1. DID YOU ASSIGN THE OUTPUT OF "optim" to an object, like "est <- optim(...)"? If yes and if "optim" terminated normally, the

Re: [R] Very slow optim()

2021-03-12 Thread Spencer Graves
TWO COMMENTS: 1. DID YOU ASSIGN THE OUTPUT OF "optim" to an object, like "est <- optim(...)"? If yes and if "optim" terminated normally, the 60,000+ paramters should be there as est$par. See the documentation on "optim". 2. WHAT PROBLEM ARE YOU TRYING TO SOLVE? I hope you will forg

Re: [R] forecast accuracy

2021-02-17 Thread Spencer Graves
u can get his email from help("fda"). Hope this helps. Spencer Graves On 2021-02-17 06:02, Faheem Jan via R-help wrote: I am new in the functional time series,  my question may be stupid as  I am new, I am  functional forecasting one year a head, Know I want to ch

Re: [R] Is there anyone who uses both R and Python here? How do you debug? Perhaps in RStudio?

2021-01-27 Thread Spencer Graves
hon since. However, this is described in the book Xie, Allaire, and Grolemund (2020) R Markdown: The Definitive Guide (Chapman & Hall and available for free at the above link). Spencer Graves On 2021-01-27 10:31, Robert Knight wrote: An iterative process works well. Python to

Re: [R] merging multiple .csv files

2020-12-15 Thread Spencer Graves
Did you work the examples in help("merge")? Also, have you looked at the "dplyr" package? It has 9 different vignettes. The lead author is Hadley Wickham, who won the 2019 COPSS Presidents' Award for work like this. Alternatively, you could manually read all 10 files, then figure out

Re: [R] Google Summer of Code 2021

2020-12-08 Thread Spencer Graves
roposal was not funded, but documentation of the basic idea is still available: https://en.wikiversity.org/wiki/Draft_Proposal_for_improving_the_ability_of_R_users_to_search_R_packages See also: https://en.wikiversity.org/wiki/Searching_R_Packages Hope this helps.

Re: [R] How to save Results in svg format

2020-12-04 Thread Spencer Graves
tried 300 pixels/in, and I think that worked, though I'm not 100% certain. hope this helps. Spencer Graves On 2020-12-03 23:21, David Carlson wrote: If you look at the examples on the manual pages for the upgma() and NJ() functions you will see that the results are generally se

Re: [R] Inappropriate color name

2020-11-17 Thread Spencer Graves
lar topics. If the name of that article were changed, then it should be a lot easier to pursue a similar name change elsewhere. Spencer Graves On 2020-11-17 15:25, Mitchell Maltenfort wrote: What about just amputating the final "n?" "Indian" might mean one of two

Re: [R] WG: Packages for mathematics

2020-11-16 Thread Spencer Graves
tation.org"; to be most useful. Many functions are included in base R. Many more are provided in contributed packages. Spencer Graves On 2020-11-16 04:02, ELLENBERGER Mihaela via R-help wrote: Von: ELLENBERGER Mihaela Gesendet: Monta

Re: [R] analyzing results from Tuesday's US elections

2020-11-08 Thread Spencer Graves
tter for the 2024 US presidential elections. Thanks for asking. Spencer Graves [1] https://github.com/sbgraves237 [2] https://en.wikiversity.org/wiki/Electoral_integrity_in_the_United_States __ R-help@r-project.org mailing

[R] analyzing results from Tuesday's US elections

2020-11-01 Thread Spencer Graves
inner from NC-09 to the US House in 2018 was detected by a college prof, who accessed the data two weeks after the election.[2] Spencer Graves [1] https://github.com/sbgraves237 [2] https://en.wikiversity.org/wiki/Local_Journalism_Sustainabilit

Re: [R] CRAN R For Windows 3.6.3

2020-09-19 Thread Spencer Graves
If you have production code written in R that make it expensive to even consider upgrading to the latest R, it may be worth paying the support fees of an organization like RStudio. Otherwise, I think it make sense to upgrade to the latest version and hope for the best. If you encounter

Re: [R] [External] Re: help with web scraping

2020-07-25 Thread Spencer Graves
Dear Rasmus Liland et al.: On 2020-07-25 11:30, Rasmus Liland wrote: On 2020-07-25 09:56 -0500, Spencer Graves wrote: Dear Rasmus et al.: It is LILAND et al., is it not? ... else it's customary to put a comma in there, isn't it? ... The APA Style recommends "Sharp et al.,

Re: [R] [External] Re: help with web scraping

2020-07-25 Thread Spencer Graves
Dear Rasmus et al.: On 2020-07-25 04:10, Rasmus Liland wrote: > On 2020-07-24 10:28 -0500, Spencer Graves wrote: >> Dear Rasmus: >> >>> Dear Spencer, >>> >>> I unified the party tables after the >>> first summary table like this: >>>

[R] prevent XML::readHTMLTable from suppressing

2020-07-24 Thread Spencer Graves
<- xml2::read_html(sosChars) MOcan2 <- rvest::html_table(sosPointers) MOcan2[[2]][1, 2] [1] "4476 FIVE MILE RDSENECA MO 64865"   MOcan2 does not have names, and some of the fields are automatically converted to integers, which I think is not smart in this application.

Re: [R] [External] Re: help with web scraping

2020-07-24 Thread Spencer Graves
Dear Rasmus: On 2020-07-24 09:16, Rasmus Liland wrote: > On 2020-07-24 08:20 -0500, luke-tier...@uiowa.edu wrote: >> On Fri, 24 Jul 2020, Spencer Graves wrote: >>> On 2020-07-23 17:46, William Michels wrote: >>>> On Thu, Jul 23, 2020 at 2:55 PM Spencer Graves

Re: [R] [External] Re: help with web scraping

2020-07-24 Thread Spencer Graves
but I believe I'll be able to get what I want from the single character string using, e.g., gregexpr and other functions.       Thanks again,   Spencer Graves Best, luke On Fri, 24 Jul 2020, Spencer Graves wrote: Hi Bill et al.:   That broke the dam:  It gave me a chara

Re: [R] help with web scraping

2020-07-24 Thread Spencer Graves
columns of the former are all character;  that's not true for the latter.   Sadly, it's not quite what I want:  It's one table for each office-party combination, but it's lost the office designation. However, I'm confident I can figure out how to hack that.       Tha

[R] help with web scraping

2020-07-23 Thread Spencer Graves
ines, xml2::read_html, and XML::readHTMLTable; see summary below.   Suggestions?   Thanks,       Spencer Graves sosURL <- "https://s1.sos.mo.gov/CandidatesOnWeb/DisplayCandidatesPlacement.aspx?ElectionCode=750004975"; str(baseURL <- base::url(sosURL)) # this might give me s

Re: [R] R 4.0.2 is released

2020-06-22 Thread Spencer Graves
Thank you and all the core R team.  Spencer Graves On 2020-06-22 03:21, Peter Dalgaard via R-help wrote: The build system rolled up R-4.0.2.tar.gz (codename "Taking Off Again") this morning. The list below details the changes in this release. You can get the source code from htt

Re: [R] Rtools required

2020-04-29 Thread Spencer Graves
se binaries for some packages are not (yet) available for R 4.0.0.   Hope this helps.   Spencer Graves On 2020-04-29 21:02, Bert Gunter wrote: Wouldn't packages that have to be built from source on installation require Rtools? Bert Gunter "The trouble with having an open m

Re: [R] R 3.6.2 is released

2019-12-12 Thread Spencer Graves
Ditto.  Spencer Graves On 2019-12-12 07:54, Rich Shepard wrote: On Thu, 12 Dec 2019, Peter Dalgaard via R-help wrote: The build system rolled up R-3.6.2.tar.gz (codename "Dark and Stormy Night") this morning. Peter, My thanks to all of you on the R core team. Rega

Re: [R] transforming dates

2019-11-03 Thread Spencer Graves
and 64ths.       Spencer Graves __ 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://www.R-project.org/posting-guide.html and provide commented, minimal, self

Re: [R] transforming dates

2019-11-03 Thread Spencer Graves
tric units.    Binary, octal or hex is superior to decimal, except for the fact that most humans have 10 digits on hands and feet.  And decimal is vastly superior to arithmetic in mixed bases, e.g., adding miles, rods, yards, feet, inches, and 64ths.       Spen

Re: [R] R 3.6.1

2019-07-17 Thread Spencer Graves
  What might be the likely outcomes of an attempt to reinstall 3.6.1?   And might that depend on whether the current 3.6.1 was uninstalled first?   Spencer On 2019-07-17 07:17, Jeff Newmiller wrote: It would never make sense for such messages to reflect normal and expected ope

Re: [R] random truncation

2019-07-13 Thread Spencer Graves
lysis with corrections that attempt to respond to Spurdle's most recent concerns.  Thanks, Spencer Graves On 2019-07-12 22:31, Abby Spurdle wrote: > The distribution of the randomly truncated variable has thus four > parameters: a, b, mu and sigma.  I was able to write down the

Re: [R] random truncation

2019-07-13 Thread Spencer Graves
maximized over variations in "b", "s" and "t" given "c".  I can get starting values for "b" and "s" from "lm", ignoring the truncation.  And I can first fit the model assuming t = s, then test whether it's different usin

[R] random truncation

2019-07-12 Thread Spencer Graves
tively easy to model the truncation as a function of "d" and / or publication that described someone doing it in R.  (I also have a couple of other variables that influence the distribution of Y.)   Thanks,   Spencer Graves [1] https://en.wikipedia.org/wiki/Truncated_

Re: [R] density vs. mass for discrete probability functions

2019-03-15 Thread Spencer Graves
On 2019-03-15 08:37, peter dalgaard wrote: Mathematically, you can bring discrete and continuous distributions on a common footing by defining probability functions as densities wrt. counting measure. You don't really need Radon-Nikodym derivatives to understand the idea, just the fact that

Re: [R] 3.5.3

2019-03-15 Thread Spencer Graves
On 2019-03-15 08:54, Jeff Newmiller wrote: You really need to get into better touch with your feelings, man... how are we supposed to know what you want? ;-) In general you should be using the main release unless you know there is a bug in it that affects you and has specifically been addre

Re: [R] density vs. mass for discrete probability functions

2019-03-15 Thread Spencer Graves
distributions, the "reference measure" is routinely taken to be the "improper prior" that assigns measure 1 to any unit interval on the real line.   Does that make it clear as mud?   Spencer Graves https://en.wikipedia.org/wiki/Probability_density_function Fur

[R] RMarkdown vignettes v. Jupyter notebooks?

2018-10-11 Thread Spencer Graves
dio from within Anaconda Navigator, or is one better off using RStudio as a separate, stand alone application -- or should one even abandon RStudio and run R instead from within a Jupyter Notebook? [I'm new to this topic, so it's possible that this question doesn't even make sen

Re: [R] using S4 objects in "with"?

2018-09-26 Thread Spencer Graves
On 2018-09-26 15:34, Duncan Murdoch wrote: On 26/09/2018 4:16 PM, Spencer Graves wrote:     Is there anything comparable to "with" for S4 objects? EXAMPLE:     A "Wave" object in the tuneR package has slots "left" and "right", plus othe

[R] using S4 objects in "with"?

2018-09-26 Thread Spencer Graves
, 2*pi, length = 6) all.equal(x, rev(x)) channel <- round(32000 * sin(440 * x)) Wobj <- Wave(left = channel, right=rev(channel)) with(Wobj, quantile(left-right))   ** This last statement throws "Error ... object 'left' not found".   Is there something c

Re: [R] Summarizing R script

2018-09-26 Thread Spencer Graves
  It depends on what you want, but I've found it very useful to create packages and submitting them to CRAN.  See "Creating R Packages" for how to do that.[1]  Part of this involves creating vignettes using Rmarkdown within RStudio.  Creating R packages and routinely running "R CMD chec

Re: [R] [FORGED] Question on Binom.Confint

2018-09-14 Thread Spencer Graves
On 2018-09-14 08:52, Guo, Fang (Associate) wrote: It's method="lrt" and I used the "binom" package.   The ultimate answer can be obtained as follows: > debug(binom.confint) > binom.confint(x = 0, n = 100, tol = 1e-8, method='lrt')   Then walk through the code line by line.    

Re: [R] Question on Binom.Confint

2018-09-13 Thread Spencer Graves
On 2018-09-13 20:58, David Winsemius wrote: On Sep 13, 2018, at 1:15 PM, Guo, Fang (Associate) wrote: Hi, I have a question with the function Binom.Confint(x,n,"method"=lrt). For likelihood ratio test, I'd like to ask how you define the upper limit when the frequency of successes is zero

[R] real time monitoring of streaming audio with R?

2018-09-10 Thread Spencer Graves
t can be done with ffplay, part of ffmpeg, but again I don't know how.   Thanks,   Spencer Graves __ 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

Re: [R] Converting chr to num

2018-08-20 Thread Spencer Graves
ocumentation including the examples, you will see that many of these issues and others are handled automatically in the way that I thought was the most sensible.  If you disagree, we can discuss other examples and perhaps modify the code for those functions.   Spencer Graves On 2018-08-20 0

Re: [R] Fwd: Quadratic programming, for loop

2018-06-26 Thread Spencer Graves
age summary to an Excel file using the "writeFindFn2xls" function, then annotate the package summary with other information to help me decide which package(s) and function(s) to try.   Hope this helps.   Spencer Graves, lead author of "sos" On 2018-06-26 07:01, Be

Re: [R] Systemfit Question

2018-05-16 Thread Spencer Graves
  I got an error when I tried to source the "structure" below beginning with "Empdata <- structure(list(country = structure(c(1L, 1L, 1L, 1L, 1L, 1L,":  The source ended with " "98", "983", "991", "995", "997"), + + + + + +  )) +"   I supplied ")" a

Re: [R] Package for Molecular Properties

2018-05-03 Thread Spencer Graves
library(sos) (mp <- findFn('{molecular properties}'))   ** found 7 matches in 4 packages and opened two web pages in my default browser with (a) the 7 matches and (b) the 4 packages. The first function was something for amino acids, like you suggested.  Two others returned compound and

Re: [R] Learning advanced R

2018-03-14 Thread Spencer Graves
he past 90 days, over 26,000 in the past 3 months.  If you can improve that article, an audience that size might be worth talking to.    Spencer Graves Best regards, Rich __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see ht

Re: [R] deparseDots to get names of all arguments?

2018-02-20 Thread Spencer Graves
On 2018-02-20 20:52, William Dunlap wrote: > Does substitute(...()) do what you want?   That's the key.  Thanks very much.   Spencer Graves > > > myFunc <- function(x, ...) substitute(...()) > > myFunc(y=1/(1:10), x=sin(3:1), z=stop("Oops"), &q

[R] deparseDots to get names of all arguments?

2018-02-20 Thread Spencer Graves
'd like to get c('a', 'b').   Thanks,   Spencer Graves > sessionInfo() R version 3.4.3 (2017-11-30) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS High Sierra 10.13.3 Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framewo

[R] Draft proposal for Searching R Packages

2018-02-17 Thread Spencer Graves
deadline is April 1.  This sounds like lots of time, except that the key thing that is missing in this draft proposal is principal investigator(s).  Without PI(s), it won't fly.       Thanks,   Spencer Graves, PhD   Founder   EffectivedDefense.org   7300 W. 107th St. # 506

[R] Scraping info from a web site?

2018-01-31 Thread Spencer Graves
:   ..$ doc :   ..- attr(*, "class")= chr "xml_node"  $ :List of 2   ..$ node:   ..$ doc :   ..- attr(*, "class")= chr "xml_node"  - attr(*, "class")= chr "xml_nodeset"   This seems like it may be progress, but I'm still confused on what to

[R] Searching R Packages

2018-01-27 Thread Spencer Graves
might be interested.   Best Wishes,   Spencer Graves, PhD   Founder   EffectiveDefense.org   7300 W. 107th St. # 506   Overland Park, KS 66212 __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mai

Re: [R] Getting all possible combinations

2017-08-23 Thread Spencer Graves
On 2017-08-23 11:35 AM, Bert Gunter wrote: ummm, Ista, it's 2^n.   or (2^n-1) if the empty set is not considered as a "combination" ;-)  spencer Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (ak

Re: [R] Convert Factor to Date

2017-08-22 Thread Spencer Graves
1-Aug-16 > Jan-161-Aug-16 > Feb-161-Aug-16 > Mar-161-Aug-16 > Apr-161-Aug-16 > May-161-Aug-16 > Jun-161-Aug-16 > Jul-161-Aug-16 > Aug-161-Aug-16 > Sep-161-Aug-16 > Oct-161-Aug-16 > >

Re: [R] Convert Factor to Date

2017-08-22 Thread Spencer Graves
On 2017-08-22 1:30 PM, Patrick Casimir wrote: Dear R Fellows, I Have a dataset( data1) with 2 columns of date showing a class of factor. How to convert them to date? Then compare them, keep the greater date only in a new column. Using as.Date to change the class to Date but the data becomes

Re: [R] Rounding of problem with sum command in R

2017-08-22 Thread Spencer Graves
On 2017-08-22 9:26 AM, niharika singhal wrote: Hello I have a vector v=c(0.0886,0.1744455,0.1379778,0.1209769,0.1573065,0.1134463,0.2074027) when i do sum(v) or 0.0886+0.1744455+0.1379778+0.1209769+0.1573065+0.1134463+0.2074027 i am getting output as 1 No:  That's only the display:

Re: [R] weight in lm

2017-08-14 Thread Spencer Graves
you know one, please add it -- or post it here, to make it easier for someone else to add it.) Thanks, Peter. Spencer Graves -pd Best wishes Troels Ring Aalborg, Denmark __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more

Re: [R] Kalman filter for a time series

2017-07-30 Thread Spencer Graves
uctSSM function has been removed from KFAS library or it never was part of KFAS. I don't know. so it won't run. Does anyone know how to fix the code so that it runs? Have you tried the vignette with KFAS? Hope this helps. Spencer Graves library(KFAS)

Re: [R] Nash equilibrium and other game theory tools implemented in networks using igraph or similar

2017-06-28 Thread Spencer Graves
roving search capabilities. If you can make it to useR!2017, we hope to see you in this session, Wed. July 5, from 17:00 - 18:30 in the main meeting room. If you might like to help with this but can't make Brussels, please stay tuned for further announcements or contact me after the con

  1   2   3   4   5   6   >