Re: [R] simple problem with unquoting argument

2024-07-03 Thread Troels Ring
Dear Ivan and Rui - thanks a lot for the effective help. All best wishes Troels Den 03-07-2024 kl. 10:25 skrev Ivan Krylov: В Wed, 3 Jul 2024 10:13:59 +0200 Troels Ring пишет: Now e looks right - but I have been unable to find out how to get the string e converted to the proper argument for

[R] simple problem with unquoting argument

2024-07-03 Thread Troels Ring
right - but I have been unable to find out how to get the string e converted to the proper argument for sum()  - i.e. what  is function xx? All best wishes Troels Ring, Aalborg, Denmark __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more

[R] gathering denominator under frac

2024-02-02 Thread Troels Ring
Hi friends - I'm plotting a ratio of bicarbonates i ggplot2 and ylab(expression(paste(frac("additive BIC","true BIC" worked OK - but now I have been asked to put the chemistry instead - so I wrote  ylab(expression(paste(frac("additive",HCO[3]^"-","true",HCO[3]^"-" - and frac saw that

Re: [R] non-linear regression and root finding

2023-11-06 Thread Troels Ring
we KNOW that pK1 is either positive OR negative, in which case we have pK1 = -exp(theta1)? Best wishes Troels Den 07-11-2023 kl. 05:10 skrev Berwin A Turlach: G'day Troels, On Mon, 6 Nov 2023 20:43:10 +0100 Troels Ring wrote: Thanks a lot! This was amazing. I'm not sure I s

Re: [R] non-linear regression and root finding

2023-11-06 Thread Troels Ring
2023 kl. 19:19 skrev Ivan Krylov: В Mon, 6 Nov 2023 17:53:49 +0100 Troels Ring пишет: Hence I wonder if I could somehow have non linear regression to find the 3 pK values. Below is HEPESFUNC which delivers charge in the fluid for known pKs, HEPTOT and SID. Is it possible to have root-finding in

[R] non-linear regression and root finding

2023-11-06 Thread Troels Ring
ls? (I know the precision asked for is extreme but it has worked well in really many applications). All best wishes Troels Ring, MD Aalborg, Denmark HEPESFUNC <-   function(H,SID,HEPTOT,pK1,pK2,pK3) {     XX <- (H^3/(10^-pK3*10^-pK2*10^-pK1)+H^2/(10^-pK3*10^-pK2)+H/(10^-pK3))     IV <

Re: [R] nlmixr2 installation problems

2023-07-16 Thread Troels Ring
E) appeared to do as expected Strange only, that RStudio doesn't suggest the type="source" by itself Best wishes Troels Den 17-07-2023 kl. 07:54 skrev Troels Ring: Thanks a lot - I was not offered the opportunity to recompile - the system just stopped. Also, today trying install

Re: [R] nlmixr2 installation problems

2023-07-16 Thread Troels Ring
:21 skrev Rui Barradas: > Às 12:55 de 16/07/2023, Troels Ring escreveu: >> Hi friends - Trying to install nlmixr2 caused problems. I'm on windows >> with R4.3.1 so made sure to have rtools 4.3 and also reinstalled R >> and then >> >> ran >> >

[R] nlmixr2 installation problems

2023-07-16 Thread Troels Ring
Hi friends - Trying to install nlmixr2 caused problems. I'm on windows with R4.3.1 so made sure to have rtools 4.3 and also reinstalled R and then ran install.packages("nlmixr2",dependencies = TRUE)and got the responseInstalling package into ‘C:/Users/Admin/AppData/Local/R/win-library/4.3’ (as

Re: [R] R emulation of FindRoot in Mathematica

2023-01-23 Thread Troels Ring
Dear Leonard - thanks a lot for the solution! Yes, you are right: pH is presumed known, so the effort is repeated at a series of chosen pH values.  It appears that no matter x0 the estimate for atp is always -6.239560e-01 which even accounting for offset of 0.008 is negative which is not possib

Re: [R] R emulation of FindRoot in Mathematica

2023-01-19 Thread Troels Ring
verify how the numbers out were calculated so they must be correct" approach to analysis does not really work for me. Tim -Original Message- From: R-help On Behalf Of Troels Ring Sent: Thursday, January 19, 2023 9:18 AM To: Valentin Petzel ; r-help mailing list Subject: Re: [R

Re: [R] R emulation of FindRoot in Mathematica

2023-01-19 Thread Troels Ring
annot verify how the numbers out were calculated so they must be correct" approach to analysis does not really work for me. Tim -Original Message- From: R-help On Behalf Of Troels Ring Sent: Thursday, January 19, 2023 9:18 AM To: Valentin Petzel ; r-help mailing list Subject:

Re: [R] R emulation of FindRoot in Mathematica

2023-01-19 Thread Troels Ring
alent to x = y = z, x^2 + y^2 + z^2 = 1, so x > = y = z = ±sqrt(1/3) ~ 0.577) > > > we’d enter > > > f <- function(x) c(x[1]**2 + x[2]**2 + x[3]**2 - 1, x[1]**3 - x[2]**3, > x[1] - x[3]) > > > multiroot(f, c(0,0,0)) > > > which yields > > > $ro

[R] R emulation of FindRoot in Mathematica

2023-01-19 Thread Troels Ring
Wolfram, Newton search or secant search is employed. I'm on Windows R 4.2.2 Best wishes Troels Ring, MD Aalborg, Denmark __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do rea

Re: [R] linetype corruption in ggplot2

2021-10-01 Thread Troels Ring
+   geom_line() +   scale_linetype_manual(values = c(solid = "solid", dashed = "dashed", dotted = "dotted")) Hope this helps, Rui Barradas Às 13:52 de 01/10/21, Troels Ring escreveu: Dear friends - another simple question: the assignment of linetype seems to be corrupte

[R] linetype corruption in ggplot2

2021-10-01 Thread Troels Ring
Dear friends - another simple question: the assignment of linetype seems to be corrupted in the code below- I would want the solid line to be the lowest  and also want the legend to be correct. I guess R orders the legend names alphabetically and could handle  that but cannot unnderstand how the

Re: [R] series of densities

2021-05-17 Thread Troels Ring
Thanks a lot to David and William - I think ggplot( data=ddd, aes(x=pH, y=BC,group=interaction(type,pH), col=type))+geom_boxplot() was very helpful! All best Troels Den 18-05-2021 kl. 02:27 skrev David Winsemius: ggplot( data=ddd, aes(x=pH, y=BC,group=interaction(type,pH), col=type))+geom_

[R] series of densities

2021-05-17 Thread Troels Ring
alpha=0.1) } GG but here I only get all pH values  plotted together whereas I want 3 series in the vertical direction at the three pH values. I wonder how this could be done? All best wishes Troels Ring, MD Aalborg, Denmark PS: Windows 10, R version 4.0.5 (2021-03-31 _

Re: [R] problems in knitting to html

2021-04-20 Thread Troels Ring
diate *.utf8.md file. I'm not sure if that would help. You may try remotes::install_github('rstudio/rmarkdown'). Regards, Yihui -- https://yihui.org On Tue, Apr 20, 2021 at 11:42 AM Troels Ring wrote: Thanks a lot - the error is not constant so I have not tried a minimal example

Re: [R] problems in knitting to html

2021-04-20 Thread Troels Ring
cible example along with your > xfun::session_info('rmarkdown')? Thanks! > > Regards, > Yihui > -- > https://yihui.org > > On Tue, Apr 20, 2021 at 11:06 AM Troels Ring wrote: >> Dear friends - newly installed windows 10 and R version 4.0.5 >> (2021-03-31

[R] problems in knitting to html

2021-04-20 Thread Troels Ring
plications-of-charge-balance-160421.utf8.md': Invalid argument// //run aborted/ But when I then simply try again it works well with no troubles. I wonder what error I have done? All best wishes Troels Ring, Aalborg, Denmark [[alternative HTML version deleted]]

Re: [R] nls problem

2020-04-02 Thread Troels Ring
alone saves me. BW Troels Fra: William Dunlap Sendt: 2. april 2020 18:50 Til: Troels Ring Cc: r-help mailing list Emne: Re: [R] nls problem Roundoff/cancelation error: compare the following. The first is equivalent to your function, the last to fitted(). > with(aedf, t(cbind(1,

[R] nls problem

2020-04-02 Thread Troels Ring
oking something easy but cannot spot it. BW Troels Ring, Aalborg, Denmark aedf <- structure(list(Flux = c(-0.141256, -0.154709, -0.215247, -0.302691, -0.32287, -0.511211, -0.605381, -0.813901, -1.11659, -1.76906 ), pH = c(7.06273, 7.11182, 7.16182, 7.18818, 7.21455,

Re: [R] cannot coerce class '"expression"' to a data.frame

2020-03-22 Thread Troels Ring
Thanks a lot - this does indeed do the trick! -Oprindelig meddelelse- Fra: peter dalgaard Sendt: 21. marts 2020 18:08 Til: Troels Ring Emne: Re: [R] cannot coerce class '"expression"' to a data.frame Oops, disregard previous... I'm no ggplot expert, bu

[R] cannot coerce class '"expression"' to a data.frame

2020-03-21 Thread Troels Ring
ssion(paste(HSO[4]," 7 no Na")), expression(paste(HNO[3]," 7 No Na"))) DD <- data.frame(x=1:7,ID) Elicits an error Error in as.data.frame.default(x[[i]], optional = TRUE) : cannot coerce class '"expression"' to a data.frame and plottin

Re: [R] variable in annotation, ggplot2

2019-12-16 Thread Troels Ring
Thanks a lot for the interesting possibilities - R is wonderful! BW Troels -Oprindelig meddelelse- Fra: Rui Barradas Sendt: 16. december 2019 19:31 Til: Troels Ring ; r-help mailing list Emne: Re: [R] variable in annotation, ggplot2 Another way: expr <- substitute(V == x, lis

[R] variable in annotation, ggplot2

2019-12-16 Thread Troels Ring
Hi friends - I have a simple problem of inserting values in label of a ggplot2. I have a vector V with two values and want to show them in the plot. Here is what I tried - at most get the first entry "28". R version 3.6.1 (2019-07-05) Windows 10 BW Troels library(ggplot2) x <- 1:5 y <

[R] ggplot2 fill problem in colour shading

2019-08-11 Thread Troels Ring
Dear friends - I have 2 problems with ggplot2 Here is the code for illustration x <- seq(1,10,length=1) y <- x^2 fill <- rep(0,length(x)) fill[(5https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide comment

Re: [R] Diff'ing 2 strings

2019-01-10 Thread Troels Ring
?Rdiff perhaps?? Troels -Oprindelig meddelelse- Fra: R-help På vegne af Martin Møller Skarbiniks Pedersen Sendt: 10. januar 2019 08:35 Til: Sebastien Bihorel Cc: R mailing list Emne: Re: [R] Diff'ing 2 strings On Sat, Jan 5, 2019, 14:58 Sebastien Bihorel < sebastien.biho...@cognigencor

[R] objects are masked _by_ '.GlobalEnv'

2019-01-08 Thread Troels Ring
[,1] [,2] [,3] # [1,] 0.0267 0.0267 0.0267 # [2,] 0.0200 0.0200 0.0200 # which is wrong and belongs to another included dataset. How did that happen to be caught in globalenvironment, how can I avoid that and get rid # of it? I can see I need to know more about environments. What do you t

Re: [R] uniroot problem

2018-12-19 Thread Troels Ring
Thanks a lot - f was renamed FF and things are OK BW Troels -Oprindelig meddelelse- Fra: Berwin A Turlach Sendt: 19. december 2018 10:27 Til: Troels Ring Emne: Re: [R] uniroot problem G'day Troels, On Wed, 19 Dec 2018 10:03:09 +0100 "Troels Ring" wrote: > Dear f

[R] uniroot problem

2018-12-19 Thread Troels Ring
Dear friends and helpers - in the script below, uniroot is called with a function CHB that calls a function, Charge. On its own, CHB apparently does what is expected, but from within uniroot, problems appear. An error is thrown Error in f(lower, ...) : could not find function "f" So CHB is not s

[R] error in chol.default((value + t(value))/2) : , the leading minor of order 1 is not positive definite

2018-05-05 Thread Troels Ring
Dear friends - I'm having troubles with nlme fitting a simplified model as shown below eliciting the error Error in chol.default((value + t(value))/2) :   the leading minor of order 1 is not positive definite - I have seen the threads on this error but it didn't help me solve the problem. Th

Re: [R] plot representation of calculated value known to be 7.4

2017-12-26 Thread Troels Ring
at's going on. 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 "Bloom County" comic strip ) On Mon, Dec 25, 2017 at 11:00 AM, Troels Ring wrote: Dear

Re: [R] plot representation of calculated value known to be 7.4

2017-12-25 Thread Troels Ring
eople keep coming along > and sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > On Mon, Dec 25, 2017 at 11:00 AM, Troels Ring <mailto:tr...@gvdnet.dk>> wrote: > > Dear friends - copy paste missed >

Re: [R] plot representation of calculated value known to be 7.4

2017-12-25 Thread Troels Ring
Dear friends - copy paste missed SID <- c() before the first loop - sorry BW Troels Den 25-12-2017 kl. 19:12 skrev Troels Ring: Dear friends - merry Christmas and thanks a lot for much help during the year! In the example below I fail to understand how the calculated value pH

[R] plot representation of calculated value known to be 7.4

2017-12-25 Thread Troels Ring
Dear friends - merry Christmas and thanks a lot for much help during the year! In the example below I fail to understand how the calculated value pH is represented in a simple plot - also included. The calculations are useful in practice and likely to be right in principle but I cannot see ho

[R] genetics: backward haplotype transmission association algorithm

2017-10-27 Thread Troels Ring
w the algorithm works and thought R code would help there. All best wishes Troels Ring Aalborg, Denmark __ 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

Re: [R] changing "," to "." in data.frame

2017-10-11 Thread Troels Ring
Thanks a lot - BW Troels Den 11-10-2017 kl. 09:58 skrev Berend Hasselman: On 11 Oct 2017, at 09:45, Troels Ring wrote: Dear friends - I have a data.frame with "," instead of "." and found the discussion http://r.789695.n4.nabble.com/How-to-replace-all-commas-with-s

[R] changing "," to "." in data.frame

2017-10-11 Thread Troels Ring
loaded via a namespace (and not attached): [1] compiler_3.4.1 tools_3.4.1svMisc_0.9-70 Rcpp_0.12.13 tcltk_3.4.1 All best wishes Troels Ring, Aalborg, Denmark __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailma

Re: [R] disturbed legend in ggplot2

2017-09-27 Thread Troels Ring
Hi Ulrik - thanks a lot for pointing out this blunder - now it is fine! Best wishes Troels Den 27-09-2017 kl. 09:31 skrev Ulrik Stervbo: Hi Troels, Try to move the size argument out of the aesthetic. Best wishes, Ulrik On Mi., 27. Sep. 2017, 08:51 Troels Ring wrote: Dear friends

[R] disturbed legend in ggplot2

2017-09-26 Thread Troels Ring
? How could I avoid it? I'm on Windows 7, R version 3.4.1 (2017-06-30) -- "Single Candle" All best wishes Troels Ring Aalborg, Denmark library(ggplot2) DF1 <- structure(list(P = c(0, 0.00222, 0.00444, 0.00667, 0.00889,

[R] weight in lm

2017-08-14 Thread Troels Ring
ay to use sqrt(k) as weight instead? Best wishes Troels Ring Aalborg, Denmark __ 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/po

Re: [R] setwd in windows

2017-07-14 Thread Troels Ring
secdir") ? -pd On 14 Jul 2017, at 13:42 , Troels Ring wrote: Dear friends - windows R 3.3.3 - sorry to ask a simple question - but I cannot make setwd work properly in scripts In the example below I have made a directory in C (firstdir) and a directory in that (secdir) and the intention

[R] setwd in windows

2017-07-14 Thread Troels Ring
Dear friends - windows R 3.3.3 - sorry to ask a simple question - but I cannot make setwd work properly in scripts In the example below I have made a directory in C (firstdir) and a directory in that (secdir) and the intention is to change directory to the second from the first - it works when

Re: [R] Fwd: Re: Setting .Rprofile for RStudio on a Windows 7 x64bit / Windows file extension hiding

2017-04-18 Thread Troels Ring
Here it is how to make extensions visible before Windows 10 https://support.microsoft.com/en-us/help/865219/how-to-show-or-hide-file-name-extensions-in-windows-explorer BW Troels Den 18-04-2017 kl. 23:44 skrev John C Frain: At the risk of adding again to the noise on this point I would reco

Re: [R] problems in vectors of dates_times

2017-04-07 Thread Troels Ring
to "UTC". Others may have > different solutions but that might work. If you don't have that, then > R decides what to use and I'm not sure how it decides. > > Sys.setenv(TZ = "GMT") > > #print("LOADING MASS LIBRARY") > #ibrary("MASS

Re: [R] problems in vectors of dates_times

2017-04-07 Thread Troels Ring
, I get no error. I think we need more information to be of any help. Best wishes, Ulrik On Fri, 7 Apr 2017 at 08:17 Troels Ring wrote: Dear friends - I have further problems handling dates_times, as demonstrated below where concatenating two formatted vectors of date_times results in error

[R] problems in vectors of dates_times

2017-04-06 Thread Troels Ring
Dear friends - I have further problems handling dates_times, as demonstrated below where concatenating two formatted vectors of date_times results in errors. I wonder why this happens and what was wrong in trying to take these two vectors together All best wishes Troels Ring Aalborg, Denmark

Re: [R] lubridate inserting unwelcome 9:21

2017-03-28 Thread Troels Ring
Thanks a lot - I got interested to make it work since just formatting in lubricate as a time automatically puts the same complete date, which was OK for me - and also provided a utility for adding days - which apparently then needs tweaking - Best wishes Troels Den 28-03-2017 kl. 20:38 sk

[R] lubridate inserting unwelcome 9:21

2017-03-28 Thread Troels Ring
Dear friends - I have a series of times on successive days and would like to convert them into a successive common time for each person (ID) . Using lubridate and adding days(1) does as expected apart from changing time zone to LMT from UTC and suddenly adding 9:21 (H:M) to all times. Individua

[R] ggplot expressions

2017-03-20 Thread Troels Ring
on) of argument" - with exactly the same string - how comes? Beautiful ggplot is not exactly low in documentation but finding the right stuff is not always easy (for me:-)) Best wishes Troels Ring, MD Aalborg, Denmark __ R-help@r-project.o

Re: [R] Simulate data from Structural Equation Model

2017-03-16 Thread Troels Ring
Hi - running rseek.org with simulate structutral model data seems to give some inputs? BW Troels Den 16-03-2017 kl. 12:34 skrev Michael Haenlein: Dear all, I am looking for an R package or code that allows me to simulate data consistent with a given structural equation model. Essentially my id

[R] nls for R version 3.3.2

2016-11-29 Thread Troels Ring
Dear friends - updated to R 3.3.2 - tried to install nls - got this sad response package ‘nls’ is not available (as a binary package for R version 3.3.2) I'm on windows 7 Did I do something wrong? Will a binary appear eventually? Would I have to make it myself? Best wishes Troels

[R] Rmpfr into data.frame

2016-11-07 Thread Troels Ring
Dear friends - Windows, R version 3.2.1 I wanted to make a ggplot2 using Rmpfr high precision data - but cannot make the data into a data.frame, as wanted by ggplot2. Hence library(Rmpfr) a <- mpfr(1,120) b <- mpfr(2,120) dff <- data.frame(a=a,b=b) elicits errors Error in as.data.frame.defau

Re: [R] gtools Gator infected...

2016-10-23 Thread Troels Ring
, Poland W dniu 22.10.2016 o 13:31, Troels Ring pisze: Thanks a lot - I have asked enigmasoftware to go and check up on this - and they'll also see your letter! BW Troels Den 22-10-2016 kl. 13:12 skrev Bob Rudis: I think your tool is a bit overzealous. VirusTotal - https://virustotal.c

Re: [R] gtools Gator infected...

2016-10-22 Thread Troels Ring
/file/5fd1b2fc5c061c0836a70cbad620893a89a27d9251358a5c42c3e49113c9456c/analysis/ & https://virustotal.com/en/file/e133ebf5001e1e991f1f6b425adcfbab170fe3c02656e3a697a5ebea961e909c/analysis/ - shows no sign of any malware in the 32-bit DLLor 64-bit DLL (I tested r-release: gtools_3.5.0.zip) On Sat, Oct 22, 2016 at 4:50 AM, Troels Ring w

[R] gtools Gator infected...

2016-10-22 Thread Troels Ring
Hi friends - just installed gtools to make rstan run. Was rapidly informed by Spyhunter 4 that gtools.dll harboured Gator. Spyhunter 4 then aggressively removed Gator - and gtools were gone and rstan out of function. Kind of sorry about this. Best wishes Troels Ring Aalborg, Denmark

[R] ggplot2 lost label

2016-09-18 Thread Troels Ring
ot;") How do Imake ggplot make a label? - I tried to annotate("text",1,5,"drug1") returning mapping: x = x, xmin = xmin, y = y geom_text: na.rm = FALSE stat_identity: na.rm = FALSE position_identity so that was not as I thought. How do I get the label directly - or an

[R] formatting expressoion(paste with line shift

2016-02-26 Thread Troels Ring
Dear friends - I find it difficult to get formatting right when expressions are made on several lines. Sorry not to find the right documentation. R version 3.2.1 Windows 7 (pHi <- seq(1,8)) #This gets formatted well but I want subscript for 2 in pCO2 plot(pHi,type="s",axes=FALSE,xlab="",lwd=

Re: [R] dataframe rbind

2015-12-04 Thread Troels Ring
(10),ID=i)) instead. Cheers Petr -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Troels Ring Sent: Friday, December 04, 2015 5:03 PM To: r-help@r-project.org Subject: [R] dataframe rbind Dear friends - I have a very simple question - I generate a num

[R] dataframe rbind

2015-12-04 Thread Troels Ring
orm(10),b=runif(10),ID=i))} - the dataframe do not grow as I thought it would. How would I do this? All best wishes Troels Ring Nephrology Aalborg Denmark __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/m

Re: [R] time conversions

2015-02-18 Thread Troels Ring
Thanks a lot and thanks to Rui Troels Den 18-02-2015 kl. 20:14 skrev peter dalgaard: On 18 Feb 2015, at 18:45 , Troels Ring wrote: dear friends - sorry to ask another simple question - I have dates set up as this: dates #[1] 2003-01-21 01:08:00 To handle it I did as.POSIXlt(dates) "20

[R] time conversions

2015-02-18 Thread Troels Ring
as.POSIXlt(dates)) 1043107680 And this works fine for modeling but now I would like to have it back as POSIXlt as.POSIXlt requires an origin, if I'm right. So how is it done? Best wishes Troels Ring Aalborg Denmark __ R-help@r-project.org mai

Re: [R] list of list

2015-02-16 Thread Troels Ring
Please excuse my brevity. On February 16, 2015 8:43:51 AM PST, Troels Ring wrote: Dear friends - this is simple I know but I can figure it out without your help. I have for each of 2195 instances 10 variables measured at specific times from 6 to several hundred, so if I just take one of the instances

[R] list of list

2015-02-16 Thread Troels Ring
ASL <- list() RES <- list() for (j in 1:5){ for (i in 1:5) ASL[[j]] <- RES[[i]] <- i^j } All best wishes Troels Ring Aalborg, Denmark __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo

[R] diff question

2015-01-11 Thread Troels Ring
R version 3.1.1 (2014-07-10) -- "Sock it to Me" Copyright (C) 2014 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) Dear friends - I have a small problem with diff (I guess) I made a sequence with fixed interval between consecutive elements - and hence thought

Re: [R] doubleYScale from latticeExtra, problems with style

2014-08-06 Thread Troels Ring
Thanks Duncan - getting still better! - but "Y2" is still unformatted and so different from "Y1" - I have been on the help page but fail to find explanations. Best wishes Troels Den 07-08-2014 08:08, Duncan Mackay skrev: (sd1 <- doubleYScale(obj1,obj2,add.ylab2 = TRUE, use.style = FALSE)) upd

Re: [R] doubleYScale from latticeExtra, problems with style

2014-08-05 Thread Troels Ring
is On Tue, Aug 5, 2014 at 10:22 AM, Troels Ring wrote: Dear friends - below is a small example showing a problem I have understanding doubleYScale from latticeExtra - R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platfor

[R] doubleYScale from latticeExtra, problems with style

2014-08-05 Thread Troels Ring
d obj2 are formatted as I wanted - but when combined the formatting is lost. How comes? Best wishes Troels Ring Aalborg, Denmark library(latticeExtra) T <- seq(1,200,length=100) Y1 <- 10+2*T+0.05*T^2 + rnorm(100,0,40) Y2 <- 0.1 + sqrt(T)+rnorm(100,1,1) tesobj <- data.frame(T=T,Y1=Y1,Y2=Y2)

[R] SE for R-squared

2014-01-10 Thread Troels Ring
? I have been through sos - but only found the above? All best wishes Troels Ring Denmark / [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] Milliken and Johnson Unbalanced Machines

2013-12-30 Thread Troels Ring
Dear friends - reading Milliken and Johnson on messy data I failed to find R code to master the unbalanced Machines data in ch 23. I wonder if anyone can lend me a hand - again Happy new year Troels Ring Aalborg, Denmark __ R-help@r-project.org

[R] simple postscript question

2013-10-14 Thread Troels Ring
question. Best wishes Troels Ring Aalborg, Denmark Windows 7, R 3.0.1 postscript(file="fig1.eps", horizontal = FALSE, onefile = FALSE, pagecentre=TRUE,paper = "special",colormodel = "rgb",width=8,height=8) par(cex=1.25,cex.lab=1.25,cex.axis=1.5,mar=c(5.1,5,4,2)) xyplot(Ammo

[R] survival aareg plot problem

2013-06-04 Thread Troels Ring
Dear friends - I'm on windows 7, R 2.15.2 when I run the example for aareg in survival package I see this: plot(lfit[4], ylim=c(-4,4)) error in xy.coords(x, y, xlabel, ylabel, log) : 'x' is a list, but does not have components 'x' and 'y' Is that a matte

[R] survival in R

2013-05-24 Thread Troels Ring
me is fractionated into short, intermediate and long time survival. I wonder if it should not be better to have a more generalized method encompassing the entirety of the observation period. Best wishes Troels Ring, MD Department of nephrology Aalborg, Denmark ___

[R] simple reshape

2013-01-22 Thread Troels Ring
6) Best wishes Troels Ring, Nephrology Aalborg, Denmark __ R-help@r-project.org mailing list 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,

Re: [R] qplot error -

2012-12-10 Thread Troels Ring
t attached): [1] colorspace_1.2-0 dichromat_1.2-4 digest_0.5.2 fortunes_1.5-0 [5] grid_2.15.1 gtable_0.1.1 labeling_0.1 MASS_7.3-22 [9] memoise_0.1 munsell_0.4 plyr_1.7.1 proto_0.3-9.2 [13] RColorBrewer_1.0-5 reshape2_1.2.1 scales_0.2.2 stringr_0.6.1 What do you mean by "a .1 lack in R "? Ru

[R] qplot error -

2012-12-10 Thread Troels Ring
R All the best Troels Ring __ R-help@r-project.org mailing list 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.

[R] fda modeling

2012-05-21 Thread Troels Ring
dly after "the same operation" than others - we would like to know why. The data are available (eventually - the resulting blood tests still are missing) if anyone would like to have a look but the main issue is if it is at all feasible to make fda work on such a problem. Bes

Re: [R] simple data.frame question

2012-05-16 Thread Troels Ring
Thanks a lot - beautiful Troels Den 16-05-2012 19:29, David Winsemius skrev: On May 16, 2012, at 11:56 AM, Troels Ring wrote: Dear friends - I hope you will forgive me another simple question, illustrated by ID <- c(1,1,1,2,2,3,3,3) PERIOD <- c(1,2,3,2,3,1,2,3) X <- run

[R] simple data.frame question

2012-05-16 Thread Troels Ring
,2,3,3,3 and 1,2,3,1,2,3,1,2,3 respectively. How do I use the pattern in ID and PERIOD to find the lacking X and put NA? Best wishes Troels Ring, Aalborg, Denmark __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

[R] fda problems - version correct?

2012-05-10 Thread Troels Ring
? Where do I get .8 as I just reinstalled? Best wishes Troels Ring, Nephrology Aalborg, Denmark > betavar = coefvar[2]*harmonics[1]^2 + coefvar[3]*harmonics[2]^2 + +coefvar[4]*harmonics[3]^2 Error in `^.fd`(harmonics[1], 2) : FDOBJ does not have a spline basis. > sessionInfo() R v

[R] Rycas help

2012-01-02 Thread Troels Ring
Dear friends, can I use Ryacas to solve the two equations X = a/(a+b) Y = (a+b)^2*(a+b+1)/(a*b) subject to a>0 and b>0 ? I'm on windows using latest R Best wishes Troels Ring Nephrology Aalborg, Denmark Jeg bruger BullGuard til at holde min computer ren. Prøv BullGuard gratis: www.bu

[R] editor for MacOS

2010-12-16 Thread Troels Ring
Dear friends - I'm using Tinn-R in Windows and find it OK. My son is running MacOS and is just starting using R and I know nothing about MacOS and R but we seem to have difficulties in finding something similar to Tinn for MaC. What are your suggestions? Thanks a lot! Troels Ring, MD Aa

[R] lattice ltext

2010-01-23 Thread Troels Ring
re=score,pt=pt,times=times,trt=trt) myPanel <- function(x,y,...){ panel.xyplot(x,y,...) ltext(x-.1,y+1,paste(pt),cex=0.5) } xyplot(score~times|trt,groups=pt,type=c("p","l"),ach, panel=myPanel) -- Troels Ring Department of nephrology Aalborg Hospital Mølleparkvej phone:

[R] ltext, small lattice question

2010-01-23 Thread Troels Ring
mes,trt=trt) library(lattice) myPanel <- function(x,y,...){ panel.xyplot(x,y,...) ltext(x-.1,y+1,paste(pt),cex=0.5) } xyplot(score~times|trt,groups=pt,type=c("p","l"),ach, panel=myPanel) -- Troels Ring Department of nephrology Aalborg Hospital Mølleparkvej phone: +4599326

[R] comparing tables from replicated data

2009-08-24 Thread Troels Ring
e changes. I hope some of you will have remarks on this problem. Best wishes Troels -- Troels Ring - - Department of nephrology - - Aalborg Hospital 9100 Aalborg, Denmark - - +45 99326629 - - tr...@gvdnet.dk __ R-help@r-project.org mailing list h

Re: [R] history: recording

2009-01-06 Thread Troels Ring
Thanks a lot - windows(record=TRUE) seems to do the job. Sorry not to have found it. Troels jim holtman skrev: ?windows On Tue, Jan 6, 2009 at 10:44 AM, Troels Ring wrote: Hi, I'm using windows xp and R 2.8.0 - I wonder what is the command to put in a script that has the same effe

[R] history: recording

2009-01-06 Thread Troels Ring
Hi, I'm using windows xp and R 2.8.0 - I wonder what is the command to put in a script that has the same effect as when in a plot you choose menu "History" and "Recording". Best wishes Troels -- Troels Ring - - Department of nephrology - - Aalborg Hospital 9100

[R] ordered factor and table

2008-09-01 Thread Troels Ring
p. I have R 2.7.1 on WinXP. Best wishes Troels -- Troels Ring - - Department of nephrology - - Aalborg Hospital 9100 Aalborg, Denmark - - +45 99326629 - - [EMAIL PROTECTED] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-

[R] lattice question

2008-07-29 Thread Troels Ring
desires. Hope someone will give me help to master the panel formation. Best wishes Troels xyplot(Na+yrep[,1:100]~time|as.factor(ID),yrepbug,type=c("g","o"), span=0.75,ylab="[Na]") -- Troels Ring - - Department of nephrology - - Aalborg Hospital 9100 Aalb

[R] R2WinBUGS problem

2008-07-24 Thread Troels Ring
a_dep","alpha","beta", "fit","deviance","rho") pigs3 <- bugs (ml_pig.data, debug=TRUE,inits=pigs3.inits, pigs.parameters, "ml3_pig.bug", n.iter=2000,n.chains=3, bugs.directory = bugs.directory) -- Troels Ring - - Department of nephrology

[R] R2WinBUGS problem

2008-07-23 Thread Troels Ring
", "sigma_dep","alpha","beta", "fit","deviance","rho") pigs3 <- bugs (ml_pig.data, debug=TRUE,inits=pigs3.inits, pigs.parameters, "ml3_pig.bug", n.iter=2000,n.chains=3, bugs.directory = bugs.directory) -- Troels Ri

[R] lattice smooth problem?

2008-07-06 Thread Troels Ring
.6077) time<-c(60,120,180,240,300,360,420,480) hh<-data.frame(ID=as.factor(ID),Na=Na,fit=fit,time=time) library(lattice) xyplot(Na+fit~time|ID,hh,type=c("g","p","smooth"), auto.key=list(lines=TRUE)) -- Troels Ring - - Department of nephrology - - Aalborg Hospital 9100 Aalbo

[R] lattice smooth

2008-07-05 Thread Troels Ring
igger 14: There are other near singularities as well. 14400 Otherwise for the whole dataset of 16 pigs it works quite OK - but only this pig number 13 makes troubles. I wonder what occurs. Best wishes Troels -- Troels Ring - - Department of nephrology - - Aalborg Hospital 9100 Aalborg, Denmark - - +45

[R] R and Excel disagreement - Goal Seek versus uniroot

2008-04-12 Thread Troels Ring
xmin #$minimum #[1] 6.102746508205e-07 #$objective #[1] -9.72253673562293e-20 I would very much appreciate some help on doing this modeling with very small numbers in R. Comments on the capability of Excel's goal seek would also be welcome. Best wishes Troels -- T

[R] regression towards the mean, AS paper November 2007

2007-12-17 Thread Troels Ring
t;-(mvrnorm(n=100, rep(0, 2), Sigma, empirical = TRUE)) res[i] <- t.test(ff[,1],ff[,2],paired=TRUE)$p.value} -- Troels Ring - - Department of nephrology - - Aalborg Hospital 9100 Aalborg, Denmark - - +45 99326629 - - [EMAIL PROTECTED] __ R-help