[R] Advice on starting to analyze smokestack emissions?

2023-12-16 Thread Karl Ropkins
Kevin, Sorry, was not aware of any access-restriction, but if you have problems and were interested in local AQ maybe https://www.epa.gov/outdoor-air-quality-data Karl -- [EXTERNAL] Message: 3 Date: Fri, 15 Dec 2023 13:29:36 +

Re: [R] R-help Digest, Vol 250, Issue 13

2023-12-15 Thread Karl Ropkins
Kevin, Maybe also look at what air quality monitoring is being done in area. https://cran.r-project.org/web/packages/RAQSAPI/vignettes/RAQSAPIvignette.html Depends what and how near, but might be something relevant there? Karl Dr Karl Ropkins Transport Studies | Environment | University of Leeds

Re: [R] problem with plotting clustered data with convex hull using ggfortify

2021-10-24 Thread Karl Schilling
Dear Mr Barradas, thank you so much. After going back to the 4.1.1 version, the convex hulls were plotted again (R 4.1.0. Windows). Will forward all this to the package maintainer. But for the moment, your hint is of great help. Thank you, all my best Karl On 25.10.2021 00:32, Rui

[R] problem with plotting clustered data with convex hull using ggfortify

2021-10-24 Thread Karl Schilling
command, "frame.type = c("convex", "norm", "t"). Whereas ""norm" and "t" give confidence ellipses as expected, "convex" results in a straight line as mentioned above. Any help would be appreciated. Best -- Karl Schillin

Re: [R] readline in function call with space in prompt.

2021-02-09 Thread Karl Ropkins
Not on a machine with latest R at moment so not ruling out something there, but it is working fine for me. Karl R version 4.0.2 (2020-06-22) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19041) -- Message: 9 Date: Tue, 9 Feb 2021 10

Re: [R] Some code to run Hutcheson t-test using R

2020-09-11 Thread Karl Schilling
Dear Luigi: no, µ1µ2 is not "missing" First, it should actually be "µ1 - µ2". And as your usual null-hypothesis when comparing h1 and h2 is that they are not different (i.e. µ1 = µ2), the latter term adds up to 0 and may be omitt

Re: [R] How to run Hutcheson t-test on R?

2020-09-08 Thread Karl Schilling
rical differences obtained with the code above and the published variances. # this is the actual t-test t <- (h1-h2) /sqrt(varh1 + varh2) p <- 2*pt(-abs(t),df= degfree) p that's it Best Karl On 08.09.2020 16:55, Rui Barradas wrote: Hello, No, it's not. That's the Shan

Re: [R] How to run Hutcheson t-test on R?

2020-09-08 Thread Karl Schilling
Could it be that the test you are looking for is implemented in the vegan package (function diversity(... index = "shannon" ...), and/or the BiodiversityR package, function "diversityresult (..., index = "Shannon",...) best, Karl Schilling ___

[R] My dream ...

2020-05-11 Thread karl adenener
It would be a dream, there would be a R-based software, which I configure according to my study (type of data, limits for meaningful measurements, handling of outliers and missing measurements, test method etc.), which then reads my original measurement data and after some computing time the sof

Re: [R] Unable to install Sequin R

2020-05-11 Thread Karl Schilling
Dear Harshita, I just tried to install seqinr on my win10 machine (R4.0) and had no problem. In your mail, you still had a typo: you wrote seqinr with an "u" - maybe that is the problem Best -- Karl Schilling __ R-help@r-project.org ma

[R] SOLVED: inadverted reordering of a df column when it is copied to another df

2017-03-17 Thread Karl Schilling
. The point I apparently missed was that the list obtained using "by", was ordered based on the factor (i.e. 1,1,1,2,2,2,3,3,3,4,4,4), and the same was true for the df I generated from this list. Thank you for all your input Karl On 17.03.2017 16:16, Thierry Onkelinx wrote: &

[R] inadverted reordering of a df column when it is copied to another df

2017-03-17 Thread Karl Schilling
ree approaches: A$x <- B$x x <- B$x (here, x is still in the correct order) B$x <- x : now x is reordered B <- cbind(A, B$x) I am working with Windows7Pro/64bit, R 3.3.3, and RStudio 0.99.903. Any help would be appreciated. Best regards

Re: [R] Error in gam() object 'scat' no found

2016-09-27 Thread Karl Neergaard
Thank you David for taking time to answer my not so helpful question. On Tue, Sep 27, 2016 at 11:15 PM, David Winsemius wrote: > > > On Sep 26, 2016, at 9:50 PM, Karl Neergaard > wrote: > > > > I received an error message while trying to use family=scat in the GAM >

[R] Error in gam() object 'scat' no found

2016-09-26 Thread Karl Neergaard
=scat) Might this problem be unrelated to GAM specifically, and to my R configuration? I have removed the gam package and re-installed it several times to no avail. Thank you for any assistance, Karl [[alternative HTML version deleted]] __ R

[R] Strange result when subsetting a data frame based on a character variable

2015-11-17 Thread Karl Schilling
r this for me rather strange behavior might be. Thank you so much for your suggestions. Karl Schilling # Exemplary code for reproducing the above described problem: options(stringsAsFactors = F) # set up some data frame value <- c(1:6) group <- rep(c("2", "9&quo

[R] Using regex to truncate repeating characters

2015-11-11 Thread Karl
Hi all, I'm trying to learn how to use regex inside R. I'm far from an expert when it comes to this, but google is my friend when it comes to finding suitable pieces of syntax to start building from. For example, this post seems to do what I want: http://stackoverflow.com/questions/12258622/regul

[R] Calculating distance between words in string

2015-11-06 Thread Karl
Hi All, Using R for text processing is quite new to me, while I have found a lot of useful functions and I'm beginning to learn regex, I need help with the following task. How do I calculate the distance between words? That is, given a specific keyword, I need to assign labels to the other words

Re: [R] dplyr and function length() and some apologies

2015-08-04 Thread Karl Schilling
e against dplyr or its authors. Quite to the contrary, i appreciate thees tools, and as you may see, tray to understand and use them. Thank you so much again Karl On 04.08.2015 13:14, Hadley Wickham wrote: No, the effect I described has nothing to do wit USING dplyr. It occurs with &g

Re: [R] dplyr and function length()

2015-08-04 Thread Karl Schilling
Dear Jeff: No, the effect I described has nothing to do wit USING dplyr. It occurs with any (preexisting) data.frame once dplyr is LOADED (require(dplyr). It is this silent, sort of "backward acting" effect that disturbs me. Best, Karl Schilling On 04.08.2015 12:20, Jeff Newmi

[R] dplyr and function length()

2015-08-04 Thread Karl Schilling
. However, what puzzles (and somewhat disturbs) me is that loading of dplyr affects how length() works, without there being a warning or masking message upon loading it. Any clarification or comment would be welcome. Thank you so much, Karl -- Karl Schilling

[R] Difference between drop1() vs. anova() for Gaussian glm models

2015-07-20 Thread Karl Ove Hufthammer
[11] LC_MEASUREMENT=nn_NO.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets [6] methods base loaded via a namespace (and not attached): [1] tools_3.2.1 -- Karl Ove Hufthammer E-mail: k...@huftis.org Jabber: huf...@jabber.

[R] problem with using seq() or rep() inside a for loop

2015-07-07 Thread Karl Schilling
of seq(...) to extract the desired values from "diagonal", I have the very same problem - it works outside a for loop, but fails inside. I am using R 3.2.1. (x64) under Win 7 Professional on a 64 bit machine. Any suggestion would be appreciated. Thank you so much. Karl -- Karl Schill

[R] Variance is different in R vs. Excel?

2015-02-09 Thread Karl Fetter
4.2 Thanks, Karl [[alternative HTML version deleted]] __ 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

Re: [R] using edit to extract codes from vignette failed

2014-09-08 Thread Karl Ropkins
$topic, fileext = ".R") : argument "name" is missing, with no default > edit(vignette("grobs",package = "grid")) > Re RStudio: https://support.rstudio.com/hc/en-us?community_id=public? ____ From: PO SU [rhelpma

[R] using edit to extract codes from vignette failed

2014-09-08 Thread Karl Ropkins
first argument or name=. Then edit will pass it to edit.vignette and it'll work. Or go direct: edit.vignette(vignette("grobs",package = "grid")). See ?vignette. Maybe the use of name as the first argument of a method is a little misleading? But you can work out what is g

[R] fortran package crashes

2014-06-23 Thread Karl May
Hi all, I have written a small Fortran routine to be attached to R for private use, that is reading matrices written to binary files by a Fortran program (I could not get "readBin" to read it). Unfortunately, when using the package R crashes every now and then, but not always, with a segmentati

Re: [R] How to draw Bubble chart with mini pie charts as bubbles

2014-06-15 Thread Karl Ropkins
inc~longitude*latitude, panel=panel.zcasePiePlot, data=temp) # then rescale smaller pie segments on the fly loaPlot(copper*10+lead*4+zinc~longitude*latitude, panel=panel.zcasePiePlot, data=temp) Best Wishes, Karl -- Message: 5 Date: Sat, 14 Jun 2014 13:03:21 -0700 (PDT) F

Re: [R] How do I perform conditional annotation of lattice

2014-01-08 Thread Karl Ropkins
lot is z ~ x * y, where z is information to be displayed at (x,y) and the package includes a very inelegant alternative to subscripting. Regards, Karl Ropkins ITS Leeds -- Date: Tue, 7 Jan 2014 15:50:39 + From: Ken Knoblauch mailto:ken.knobla...@inserm.fr>&g

Re: [R] R newbie - loop questions

2013-11-07 Thread Karl Schelhammer
gt; On Thursday, November 7, 2013 12:27 PM, Karl Schelhammer > wrote: > Sorry for the confusion. results is a 2 x 2 matrix containing real positive > values. The goal is to divide each element of the matrix by the sum of the > elements in a row and store the result in results.nor

[R] identifying which column an observation comes from?

2013-10-16 Thread Karl Fetter
nrow = 3, byrow = T) rownames(mat) <- c("AL", "MS", "FL") > mat [,1] [,2] [,3] AL100 MS010 FL001 How can I make a data frame like this: AL 1 MS 2 FL 3 Thanks for your ideas and time, Karl

[R] order() not producing results as I expect

2013-10-10 Thread Karl Fetter
wvfa2 55 flse6.pop2 2 0 19254 flse6 54 flse5.pop2 2 0 19254 flse5 Many thanks, Karl [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.et

[R] How to standardize the generalized hyperbolic distribution?

2013-05-01 Thread Hans Karl
Hi, I want to fit a standardized generalized hyperbolic distribution to my data. I am aware, that I can do this with the dsgh command of the fBasics package along with the optim command. My problem is, that I also want to have a derivation of it. So I need the theory behind it, i.e. I need the

Re: [R] Border width on symbols plotted with the lattice package

2013-02-10 Thread Karl Ove Hufthammer
ilai skreiv: > Like this ? > xyplot(4:5~4:5, groups=4:5, lex = 5 , > par.settings = simpleTheme(cex=10, pch=21, lwd=5), > auto.key=TRUE) Thanks, both David and ilai. The ‘lex’ solution seems to work very well. -- Karl Ove Hufthammer E-mail: k...@huftis.org Jabber: huf.

[R] Border width on symbols plotted with the lattice package

2013-02-08 Thread Karl Ove Hufthammer
ys thin no matter what I set 'lwd' to. However, the symbols shown in the *legend* has the 'lwd' correctly applied. How can I fix this? Or is it simply a bug in the 'lattice' package? Karl Ove Hufthammer Output of 'sessionInfo()': R version 2.1

Re: [R] Sparse dataframes?

2013-01-15 Thread Karl Ove Hufthammer
p://vita.had.co.nz/papers/tidy-data.pdf -- Karl Ove Hufthammer E-mail: k...@huftis.org Jabber: huf...@jabber.no __ 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/

Re: [R] Tukey HSD plot with lines indicating (non-)significance

2013-01-15 Thread Karl Ove Hufthammer
Thanks for the suggested code! It’s a very nice way of displaying most aspects of the data and the HSD tests/CIs. The graphical display is probably to big for inclusion in journal articles, but works well for displaying the results when working with the data. Regards, Karl Ove Hufthammer ty

Re: [R] Tukey HSD plot with lines indicating (non-)significance

2013-01-15 Thread Karl Ove Hufthammer
, aes(x=trt, y=ShootDryMass)) + geom_boxplot(outlier.colour=NA) + geom_jitter(col="red", size=3, position=position_jitter(width=.1)) + geom_segment(aes(x=lstart, xend=lend, y=y, yend=y, linetype=nodraw), lindat) -- Karl Ove Hufthammer

Re: [R] Tukey HSD plot with lines indicating (non-)significance

2013-01-14 Thread Karl Ove Hufthammer
riginal posting: l.mmc=mmc(l, linfct = mcp(trt = "Tukey")) plot(l.mmc) (It looks best on data where the group means aren’t very close; otherwise the labels might overlap.) -- Karl Ove Hufthammer __ R-help@r-project.org mailing list h

[R] Tukey HSD plot with lines indicating (non-)significance

2013-01-14 Thread Karl Ove Hufthammer
) + geom_jitter(col="red", size=3, position=position_jitter(width=.1)) Is there such a function available in R? -- Karl Ove Hufthammer __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] function to filter identical data.fames using less than (<) and greater than (>)

2012-12-06 Thread Karl Brand
asics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/BatteriesO.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --

Re: [R] function to filter identical data.fames using less than (<) and greater than (>)

2012-12-06 Thread Karl Brand
t fine, love to see any idiomatic ways you might attempt this (also for the sake of improving my grasp of R). Cheers, Karl On 06/12/12 15:57, Jeff Newmiller wrote: You have not indicated why the subset function is insufficient

Re: [R] function to filter identical data.fames using less than (<) and greater than (>)

2012-12-06 Thread Karl Brand
Rui, Indeed it does help. Also very happy to see eval() and parse() employed and demystified here. In Rdulation, Karl On 06/12/12 15:48, Rui Barradas wrote: Hello, Something like this? func <- function(data, A, B, C){ f <- function(a) function(x) eval(parse(text = pa

[R] function to filter identical data.fames using less than (<) and greater than (>)

2012-12-06 Thread Karl Brand
quot; and "greater than" so google picks up this thread Once again i find just how limited my grasp of R is...Is do.call() the best way to call binary operators like < & > in a function? Is an ifelse statement needed for each column to make filtering on it optional? etc A

Re: [R] POSIXlt and daylight savings time

2012-09-05 Thread Karl Ove Hufthammer
s? I've read about the 'isdst' but it is still unclear what to > do. There *was* no 02:00:00 in your local timezone, so you’re trying to specifiy a point in time that just didn’t exist. If you really want to do this, use the UTC timezone, by setting the ‘tz’ argument in as.POSIXct/as.

Re: [R] Parameter scaling problems with optim and Nelder-Mead method (bug?)

2012-08-18 Thread Karl Ove Hufthammer
ous effect on the values chosen for later iterations, while their (absolute) values seems to have *no* effect on the initial simplex (but their relative values do have an effect, and a correct effect, AFAICS). Karl Ove Hufthammer la. den 18. 08. 2012 klokka 07.32 (-0700) skreiv Bert Gunter: &

[R] Parameter scaling problems with optim and Nelder-Mead method (bug?)

2012-08-18 Thread Karl Ove Hufthammer
ckages: [1] stats graphics grDevices utils datasets methods base -- Karl Ove Hufthammer __ 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-guid

Re: [R] how to deduplicate records, e.g. using melt() and cast()

2012-05-08 Thread Karl Brand
Fantastic Jan, Thanks a lot for the example on how i achieve this with melt()/cast(). Very good for my understanding of these functions. Karl On 07/05/12 13:49, Jan van der Laan wrote: using reshape: library(reshape) m <- melt(my.df, id.var="pathway", na.rm=T) cast(m, pat

Re: [R] how to deduplicate records, e.g. using melt() and cast()

2012-05-07 Thread Karl Brand
Dimitris, Petra, Thank you! aggregate() is my lesson for today, not melt() | cast() Really appreciate the super fast help, Karl On 07/05/12 12:09, Dimitris Rizopoulos wrote: you could try aggregate(), e.g., my.df <- data.frame(pathway = c(rep("pw.A", 2), rep("pw.B&q

[R] how to deduplicate records, e.g. using melt() and cast()

2012-05-07 Thread Karl Brand
to convert it to. But i'm just not getting it, ?cast that is! So i'd really appreciate some ones patience to clarify this, using the reshape package, or any other approach. With sincere thanks in advance, Karl ## Runnable example ## The data.frame i have: library("reshape")

[R] Importing name/value formatted data

2012-03-06 Thread Karl Ove Hufthammer
r one, but I don’t know what this type of data format is called. -- Karl Ove Hufthammer __ 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 a

Re: [R] help updating package rJava (on ubuntu)

2012-02-20 Thread Karl Brand
he couple simple steps you suggest. Also good to know that Java 1.7 can be used with the latest R (which is all i intend to install). Thanks again for the follow up, Karl On 02/20/2012 03:37 AM, Simon Urbanek wrote: On Feb 19, 2012, at 4:31 PM, Karl Brand wrote: Hi Hasan, Success. For myself a

Re: [R] help updating package rJava (on ubuntu)

2012-02-19 Thread Karl Brand
Hi Hasan, Success. For myself and FWIW to other useR's here's how i spent the sunny half of my sunday to achieve it :/ Many thanks for your and Simon's input, Karl Since: $ javac -version returned nothing i believe you (and Simon) were right, i.e, it (and JDK) were missi

Re: [R] help updating package rJava (on ubuntu)

2012-02-18 Thread Karl Brand
licit details for myself to be able use. Thanks again, also for any further suggestions, Karl On 02/18/2012 07:45 PM, Simon Urbanek wrote: On Feb 18, 2012, at 10:44 AM, Karl Brand wrote: Esteemed useRs and Devs, Attempts to update package:rJava to the latest version have failed. See my co

[R] help updating package rJava (on ubuntu)

2012-02-18 Thread Karl Brand
error or warning, but my rJava package is not updated, and remains un-updatable... Greatly appreciate any suggestions getting my rJava updated, Karl > update.packages(lib.loc = "/usr/lib/R/site-library") --- Please select a CRAN mirror for use in this session --- Loading Tcl

[R] R: writing data from one matrix into another with keeping NA's

2011-11-18 Thread Karl Weinmayer
hieving the same but more directly? I know it's just one additional line, but it's still bugging me and it will definitely come in handy at some time. Best regards, Karl ##Loading Packages library(qpcR) data = c(1,NA, 2, 3) row=2 col=28 x <- matrix(data=data, nrow

[R] 3D Graph Surface and single points (eg wireframe with points)

2011-10-31 Thread Karl Knoblick
ssible to animate the 3D plot? Or rotate interactive?     Best regards Karl __ 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 com

[R] accumulate vector data

2011-10-07 Thread Karl Weinmayer
Hi, What is the best way to accumulate the entries in a vector. For example, a <- c(1,2,3,4,5) And I want to have b <- c(1,3,6,10,15) Best, Karl [[alternative HTML version deleted]] __ R-help@r-project.org m

[R] Numeric Characters in String

2011-09-16 Thread Karl Weinmayer
<- c(14, 15, 16, 120) I need a generic solution for this. My actual vector contains about 403 strings, and it is bound to change with different versions of my calculations. So I need something that either extracts all numeric characters or deletes everything else. I hope you can help me out.

Re: [R] How does one start R within Emacs/ESS with root privileges?

2011-09-09 Thread Karl Brand
times i do need to install into the system-wide library, i think i'll survive in the terminal :P cheers, Karl On 2011-09-07 17:08, Spencer Graves wrote: Under Vista and Windows 7, I install R in a local directory "pgms" so I never have to worry about permissions. Under Linu

Re: [R] How does one start R within Emacs/ESS with root privileges?

2011-09-07 Thread Karl Brand
of R install/maint. i'd prefer to do this interactively within Emacs rather than the terminal. Motivated by this, i'd still like to find out how to invoke R with root privileges. I've also reposted the original email on perhaps a more appropriate forum at: ess-h...@stat.math.ethz

[R] How does one start R within Emacs/ESS with root privileges?

2011-09-07 Thread Karl Brand
ers. If so i'd really appreciate tips on efficient package installation/maintenance using Emacs/ESS. TIA, karl -- Karl Brand Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam P +31 (0)10 704 3455 | F +31 (0)10 704 4743 | M +31 (0)642 777 268 _

Re: [R] X11 problem

2011-08-25 Thread Karl Brand
and saved as .txt the contents of the entire page that your served by this link. This 'key.txt' is then imported (via gui on 11.04 natty) by: synaptic > settings > repositories > authentification tab > click 'import key file' and select your saved 'key.txt&

Re: [R] Bug or feature? sum(c(a, b, c)) != (a + b + c)

2011-08-24 Thread Karl Ove Hufthammer
nice example. The paper is available online at http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.103.344&rep=rep1&type=pdf -- Karl Ove Hufthammer __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the p

Re: [R] Sample size AUC for ROC curves

2011-08-14 Thread Karl Knoblick
but I am confused a little Karl  - Ursprüngliche Mail Von: David Winsemius An: Karl Knoblick CC: Greg Snow ; "r-h...@stat.math.ethz.ch" Gesendet: Samstag, den 13. August 2011, 2:18:37 Uhr Betreff: Re: [R] Sample size AUC for ROC curves On Aug 11, 2011, at 5:50 AM, Kar

Re: [R] Sample size AUC for ROC curves

2011-08-11 Thread Karl Knoblick
or something similar but newer?   The question is just easy - How many subjects do I need if I want to show that my diagnostic test is not only a game of dice. Data for input are the epected AUC, alpha and beta,   Would be great if somebody has a solution!   Karl - Ursprüngliche Mail

[R] Sample size AUC for ROC curves

2011-08-08 Thread Karl Knoblick
Hallo! Does anybody know a way to calculate the sample size for comparing AUC of ROC curves against 'by chance' with AUC=0.5 (and/or against anothe AUC)? Thanks! Karl __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listi

Re: [R] Differences between ROC curves

2011-08-08 Thread Karl Knoblick
Package pROC does the job - roc.test with parameter paired=F Karl   - Ursprüngliche Mail Von: Karl Knoblick An: r-h...@stat.math.ethz.ch Gesendet: Montag, den 27. Juni 2011, 12:19:48 Uhr Betreff: Differences between ROC curves Hallo! Can anybody help with the comparison of ROC

Re: [R] Compare AUC of uncorrelated ROC curves

2011-08-08 Thread Karl Knoblick
Package pROC does the job - roc.test withparameter paired=F Karl - Ursprüngliche Mail Von: Karl Knoblick An: r-h...@stat.math.ethz.ch Gesendet: Dienstag, den 21. Juni 2011, 23:19:17 Uhr Betreff: Compare AUC of uncorrelated ROC curves Hallo! I want to compare two uncorrelated ROC

Re: [R] Plotting question

2011-08-02 Thread Karl Ove Hufthammer
Try example(coplot) for an idea about it could look (ignore the marginal plots). Of course, do use the lattice or the ggplot2 package, not the coplot function. Too bad you have 10 groups and not 9 (or 12), BTW ... :-/ -- Karl Ove Hufthammer __

Re: [R] Clean up a scatterplot with too much data

2011-08-02 Thread Karl Ove Hufthammer
Three nice alternatives: example(smoothScatter) example(sunflowerplot) library(hexbin) example(hexbinplot) (And do remove the outliers before plotting.) -- Karl Ove Hufthammer __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/

Re: [R] Binning numbers into integer-valued intervals (or: a version of cut or cut2 that makes sense)

2011-07-26 Thread Karl Ove Hufthammer
# 100 intervals generated cut3(1:2, ints=2) # lowest interval expanded to 0 cut3(1:2, include.lowest=TRUE) # lowest interval not expanded cut3(5, ints=3)# also works with very short vectors -- Karl Ove Hufthammer __

Re: [R] inside p value 'e'

2011-07-25 Thread Karl Ove Hufthammer
Dieter Menne wrote: >> I have like 5.075e-12 , 3.207e-05, 7.438e-07 and 9.393e-08 *** , i dont >> know what number they are > > http://en.wikipedia.org/wiki/Floating_point Or use ‘format’ in R. Example: format(5.075e-8, scientific=FALSE) -- K

[R] Binning numbers into integer-valued intervals (or: a version of cut or cut2 that makes sense)

2011-07-25 Thread Karl Ove Hufthammer
attached base packages: [1] splines stats graphics grDevices utils datasets methods [8] base other attached packages: [1] Hmisc_3.8-3 survival_2.36-9 loaded via a namespace (and not attached): [1] cluster_1.14.0 grid_2.13.1 lattice_0.19-30 -- Karl Ove Hufthammer

[R] Differences between ROC curves

2011-06-27 Thread Karl Knoblick
of ROC curve) is better in either the older or newer sample or if they are equal.) Thanks for any help! Karl __ 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

[R] Compare AUC of uncorrelated ROC curves

2011-06-21 Thread Karl Knoblick
AUC of wo uncorrelated ROC curves? (Why do I want to do this? I have two samples an older and a newer one.The question is, if the diagnostic test (AUC of ROC curve) is better in either the older or newer sample or if they are equal.) Thanks for any help! Karl

Re: [R] text mining analysis and word visualization of pdfs

2011-05-18 Thread Karl Ove Hufthammer
x™ for Poets + R (ggplot2) HTH. -- Karl Ove Hufthammer __ 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, se

Re: [R] %in% operator - NOT IN

2011-05-09 Thread Karl Ove Hufthammer
Dan Abner wrote: > I am attempting to use the %in% operator with the ! to produce a NOT IN > type of operation. Just use the ‘%nin‰’ operator in the ‘Hmisc’ package. :-) -- Karl Ove Hufthammer __ R-help@r-project.org mailing list

Re: [R] heatmap.2 - change column & row locations; angle / rotate

2011-04-18 Thread Karl Brand
nted out to me that some times the best way to get it just right is using more basic functions, which for heatmaps would be image(). See: https://www.stat.math.ethz.ch/pipermail/bioconductor/2010-August/034995.html hth, karl On 04/18/2011 10:38 AM, chakri2...@yahoo.co.in wrote: Dear Karl

Re: [R] Quiz: Who finds the nicest form of X_1^\prime?

2011-04-13 Thread Karl Ove Hufthammer
Marius Hofert wrote: > Haha, I found a hack (using the letter "l"): > > plot(0,0,main=expression(italic(X)[1]^bolditalic("l"))) Why cheat when you can use a *real* prime character: plot(0, 0, main=expression(paste(italic(X)[1],"\

Re: [R] Venn Diagram corresponding to size in R

2011-03-09 Thread Karl Brand
Hi Shira, Check out "venneuler" http://cran.r-project.org/web/packages/venneuler/index.html Labelling can be a little tricky, but if you search this forum for "venneuler" you'll find some tips which helped me. hth, karl On 03/09/2011 02:25 AM, Shira Rockowitz w

Re: [R] Segfaults of eigen with blas-atlas at x86_64-pc-linux-gnu systems

2011-02-21 Thread Karl Ove Hufthammer
//cran.r-project.org/doc/manuals/R-admin.html#BLAS and especially http://cran.r-project.org/doc/manuals/R-admin.html#Shared-BLAS -- Karl Ove Hufthammer __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do rea

Re: [R] Subset according to groups NA proportion within specific variables

2011-02-21 Thread Karl Ove Hufthammer
sing=nrow(na.omit(x))/nrow(x) ) newdf = ddply(df, .(x), na.prop) Now you can use ‘subset’ on ‘newdf’ to obtain the required rows. (For very large data sets it may be better to not create an entire data frame in ‘na.prop’, duplicating the data in ’df’, but instead just return the proportion.) --

Re: [R] Segfaults of eigen

2011-02-21 Thread Karl Ove Hufthammer
nd blas-atlas-3.9.23-r4 > is installed by compiling the sources. Recompiling R and blas-atlas did > not solve the issue. This issue seems the reason that example(svm) > creates segfaults, too. FWIW, this does *not* crash R on my system, running 2.12.2 RC with GotoBLAS2. -- Karl Ove Huftham

Re: [R] Applying multiple functions to one object

2011-02-10 Thread Karl Ove Hufthammer
t; each(min, max)(1:10) Thanks! I really should have known about this, as I use the ‘plyr’ package daily. It doesn’t handle multiple objects though, AFAICS, so hopefully the function Vettorazzi and I created is of some use too. :) -- Karl Ove Hufthammer _

Re: [R] please hep in uniform distribution

2011-02-08 Thread Karl Ove Hufthammer
Woo wrote: > So I done it by sum(B calculate the number of cases in the distribution or what I have done is > fine What you have done is fine. -- Karl Ove Hufthammer __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/

Re: [R] "strange" behavior of panel.abline inside a for-loop

2011-02-08 Thread Karl Ove Hufthammer
; As you can see, the vertical line is always printed at x=10 [and not at > x=i]. Why? No, it’s printed at x=i, which is 10 at the end of the loop. You can see this by changing i to for example 5 and rerunning ‘plot.list[[3]]’. -- Karl Ove Hufthammer ___

Re: [R] Frequency plot --- stacked symbols

2011-02-08 Thread Karl Ove Hufthammer
in the ‘BHH2’ package. Note that both packages define a ‘dots’ function, and one of them with mask the other if you load both packages. You might also be interested in the ‘stem’ function (part of the default R packages). -- Karl Ove Hufthammer ___

Re: [R] how to learn more from R

2011-02-04 Thread Karl Ove Hufthammer
demos, but note that more become available when you load new packages (try the ‘rgl’, ‘lattice’ and ‘animation’ packages for some nice graphical demos). -- Karl Ove Hufthammer __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/list

Re: [R] Applying multiple functions to one object

2011-02-04 Thread Karl Ove Hufthammer
er" "character" "character" And it adds row names if they are specified: $ x = list(norm=rnorm(100), exp=rexp(100), gamma=rgamma(100, 3, 5)) $ msum(x, mean, median ) mean median norm -0.1539711 -0.1048998 exp0.9726821 0.7661752 gamma 0.5556737 0.4678

[R] Applying multiple functions to one object

2011-02-02 Thread Karl Ove Hufthammer
3, 3L, 3.14, factor(3)) fun(x, mode, typeof, class) -- Karl Ove Hufthammer __ 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

Re: [R] nlminb doesn't converge and produce a warning

2011-01-21 Thread Karl Ove Hufthammer
avis : > In nlminb(vect, V, lower = c(rep(0.01, 12), rep(0.01, 3), rep(-Inf, : > unrecognized control element(s) named `maxit' ignored Just increase the maximum number of iterations. Which you tried to do, but didn’t succeed in, as the above warnings shows. The argument is called ‘ite

[R] table on factors with non-ASCII characters *extremely* slow on Windows

2011-01-19 Thread Karl Ove Hufthammer
s and Linux. I guess at least for simple cases one could use something like res=tabulate(x.fac.nascii, nbins=nlevels(x.fac.nascii)) names(res)=levels(x.fac.nascii) though I’m not entirely sure the internal structure of factors is guaranteed to be so that this will always work. Any comments

Re: [R] CSV value not being read as it appears

2011-01-17 Thread Karl Ove Hufthammer
Peter Ehlers wrote: > It is hardly R's fault that Excel users routinely commit > crimes against data. A ‘fortune’ candidate? -- Karl Ove Hufthammer __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] CSV value not being read as it appears

2011-01-17 Thread Karl Ove Hufthammer
ckage for this. If you run the result through the ‘latex’ function, you get an even nicer output, with small histograms for each numerical variable. -- Karl Ove Hufthammer __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-he

Re: [R] From polynomial to function

2011-01-12 Thread Karl Ove Hufthammer
polynomial* [7] LCM.polynomial* lines.polynomial*Math.polynomial* [10] Ops.polynomial* plot.polynomial* points.polynomial* [13] predict.polynomial* print.polynomial*solve.polynomial* [16] summary.poly

Re: [R] attempted merge() returns: cannot coerce type 'closure' to vector of type 'any'

2010-12-02 Thread Karl Brand
Cheers Bill, Thank you for the clarificaiton. Prabably showing the str() of these objects would have made it easier for you see exatly where i was going wrong. Which as David pointed out, was really a lack of ?merge reading...:) Karl On 12/2/2010 5:46 PM, William Dunlap wrote: I didn&#

Re: [R] attempted merge() returns: cannot coerce type 'closure' to vector of type 'any'

2010-12-02 Thread Karl Brand
On 12/2/2010 3:52 PM, David Winsemius wrote: On Dec 2, 2010, at 5:58 AM, Karl Brand wrote: On 12/2/2010 11:36 AM, David Winsemius wrote: On Dec 2, 2010, at 5:22 AM, Karl Brand wrote: Cheers Bill. Inserting earlier debris: I don't understand why i get this error message

Re: [R] attempted merge() returns: cannot coerce type 'closure' to vector of type 'any'

2010-12-02 Thread Karl Brand
On 12/2/2010 11:36 AM, David Winsemius wrote: On Dec 2, 2010, at 5:22 AM, Karl Brand wrote: Cheers Bill. You got me halfway, since: > temp <- merge(x=x, y=y[,17, drop=FALSE], by="rownames", sort=FALSE) Error in fix.by(by.x, x) : 'by' must specify valid column

Re: [R] attempted merge() returns: cannot coerce type 'closure' to vector of type 'any'

2010-12-02 Thread Karl Brand
=x, y=y[,17, drop=FALSE], by="row.names", sort=FALSE) works (but adds a column "Row.names"). Which seems some what counter intuitive to me since i am feeding in two matrices to the merge function, which i understand have 'rownames', not 'row.names' as data

[R] attempted merge() returns: cannot coerce type 'closure' to vector of type 'any'

2010-12-01 Thread Karl Brand
the normal way here? I'm forced to add the column using: temp.b <- cbind(x, y[match(rownames(x), rownames(y)),17]) All insights appreciated for this leaRner, cheers, Karl -- Karl Brand Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam P

  1   2   3   >