[R] Interpretation of download counts of r packages using cranlogs::cran_downloads

2021-09-08 Thread Dr. Robin Haunschild
from a real user? Best regards, Robin -- Dr. Robin Haunschild Max Planck Institute for Solid State Research Heisenbergstr. 1 D-70569 Stuttgart (Germany) phone: +49 (0) 711-689-1285 fax: +49 (0) 711-689-1292 email: r.haunsch...@fkf.mpg.de http://www.fkf.mpg.de/ivs Publons: https://publons.com

Re: [R] Color in stripchart

2021-03-10 Thread Dr. Robin Haunschild
Dear Rasmus, thanks, that works, too. Great! Best, Robin On 3/10/21 5:22 PM, Rasmus Liland wrote: > Hello there again, > > Sorry, I missed that part in the middle > about set.seed. As per [1], you need to > run stripchart again with the add > argument set to TRUE,

Re: [R] Color in stripchart

2021-03-10 Thread Dr. Robin Haunschild
Dear Gerrit, thanks a lot; it works with beeswarm and pwcol=df$color. Best, Robin On 3/10/21 3:04 PM, Gerrit Eichner wrote: > Dear Robin, > > if you study stripchart's code (graphics:::stripchart) carefully > you will find out that the elements of the vector provided to t

Re: [R] Color in stripchart

2021-03-10 Thread Dr. Robin Haunschild
Dear Rasmus, there is no difference in the small exmaple, because there is only one point per year. If you use the example with multiple points per year, you will see the difference. Best, Robin On 3/10/21 3:15 PM, Rasmus Liland wrote: > Dear Robin and Gerrit, > > I am unable t

[R] Color in stripchart

2021-03-10 Thread Dr. Robin Haunschild
e black ones, but I do not get the stacking right: stripchart(df$value ~ df$year, pch=18, method='stack') points(df[df$color=='blue',]$value, df[df$color=='blue',]$year-2010, type='p', pch=18, col='blue') points(df[df$color=='red',]$value, d

Re: [R] AES spesification

2020-10-21 Thread Dr. Robin Haunschild
Hi, what about this one? ggplot(data=mpg[mpg$year==1999,], aes(x=displ, y=hwy))+ geom_point() Best, Robin On 10/21/20 3:37 PM, Engin Yılmaz wrote: > Dear > > I use dataset , as called "mpg" > > This is code > > ggplot(data=mpg)+ geom_point(mapping =

[R] Different performance with different R versions

2018-12-11 Thread cowan robin
I am running a small simulation, and getting very different run times when I use different versions of R. Two set-ups using the same machine (MacBook Pro 2013 vintage) 1. R version 3.1.3 running on system OS X 10.9.5 > system.time(source("simulationR-R.R")) user system elapsed 3.890 0

Re: [R] Merging dataframes

2018-05-02 Thread Dr. Robin Haunschild
me', 'Sex', 'Phone') Table_B Did you have a look at this one? Table_C <- merge (Table_A, Table_B, by="Email", all = TRUE) Table_C[is.na(Table_C$Name.y),] Table_C[is.na(Table_C$Name.x),] Table_C contains all data from Table_A and Table_B. The key.x is NA if

[R] Assigning fate percent to plots

2015-07-15 Thread Robin Gropp
Hi. I have a big data set which could be represented something like this: *plot fate* 1 S 2 M 3 S 3 S 3 M 4 S 4 S 5 S 5 M 5 S 5 S 6 M 7 M where plot is a location, and fate is either "surv

[R] gam mgcv family=scat

2014-12-24 Thread Somers-Yeates, Robin
ing someone could tell me whether the model specified above is theoretically sound (i.e. is it okay to include these different smooth types (ti, s & bs="re") with this family)? Any advice would be greatly appreciated. Thanks in advance. Robin [[alternative HTML version d

Re: [R] Maximum likelihood with analytical Hessian and

2014-12-18 Thread Xavier Robin
carefully. > > Generally the work in computing the Hessian ( # obs * (# parameters)^2 > in size) is not worth the effort, but there are problems for which it > does make a lot of sense. > > JN > > On 14-12-18 06:00 AM, r-help-requ...@r-project.org wrote: >> Message: 1

[R] Maximum likelihood with analytical Hessian and

2014-12-17 Thread Xavier Robin
Dear list, I have an optimization problem that I would like to solve by Maximum Likelihood. I have analytical functions for the first and second derivatives of my parameters. In addition, some parameters are constrained between 0 and 1, while some others can vary freely between -Inf and +Inf. I a

[R] ANOVA in R

2013-12-07 Thread Robin Mjelle
ID a_t1a_t2b_t1b_t2 CACCCGTAGAACCGACCTTGCG_mmu-miR-99b-5p15781941234810941 CACCCGTAGAACCGACCTTGC_mmu-miR-99b-5p4424265643839 CACCCGTAGAACCGACCTTG_mmu-miR-99b-5p544366253 CCGTAGAACCGACCTTGCG_mmu-miR-99b-5p263333157 CGTAGAAC

[R] R help-classification accuracy of DFA and RF using caret

2013-11-06 Thread Henderson, Robin Michelle
function to my data. As I am relatively new to R and my thesis committee is unable to help as they are also unf! amiliar with R, I thought it best to ask for help. Would someone be willing to help me? Thanks, Robin http://www.epa.gov/wed/pages/models/rivpacs/rivpacs.htm > TrainDataDFAgr

[R] correlation between rows of different data frames

2013-08-28 Thread Robin Mjelle
Hi, I have two data frames with time serie datamatrix. I want to pick a row X from the first matrix and see if it correlates with row Y in the second matrix. These are gene expression values and I probaly need to do some scaling first, but I wonder if you have any suggestions on how to do the corr

[R] EdgeR annotation

2013-08-24 Thread Robin Mjelle
after updating R and edgeR I lost the annotations in the final Diff.Expressed matrix (toptags) when running the edgeR pipeline. How do I get the row.names from the data matrix into the topTag-matrix? data <- read.table("KO_and_WT_Summary_miRNA_Expression.csv", row.names=1, sep="", header=T) keep

[R] Flexmix and variance of error terms

2013-08-09 Thread Robin Tviet
Hi, I am using flexmix to model some data which is modelled with linear regressions. I have results obtained along the lines of that shown below, and can retreive component parameters, but I cannot find a way or retrieving the variance of the sigma (variance of the normal model) can anyone a

Re: [R] How to create a dendrogram with colored branches

2013-08-03 Thread Robin Cura
Hi, You'll find a usefull post here : http://gastonsanchez.wordpress.com/2012/10/03/7-ways-to-plot-dendrograms-in-r/ For my part, I use the last method (A2R) to plot trees like the figure you posted. HTH, Robin 2013/8/3 beginner > Hi > > I would like to create a dendrogram

[R] strings

2013-05-23 Thread Robin Mjelle
I have two files containing words. I want to print the are in file 1 but NOT in file 2. How do I go about? file 1: ABL1 1 ALKBH1 2 ALKBH2 3 ALKBH3 4ANKRD17 5 APEX1 6 APEX2 7 APTX 8 ASF1A 9 ASTE1 10 ATM 11 ATR 12 ATRIP 13 ATRX 14 A

[R] Regression and FMMs with flexmix

2013-04-24 Thread Robin Tviet
I am repeating this because it seems that some people think it is important to reveal your identity I don;t understand why this is so important. Hopefuly now this list will be helpful. Could someone please assist with this I am trying to understand how to use the flexmix package, I have

[R] Overlay two stat_ecdf() plots

2013-04-15 Thread Robin Mjelle
I want to plot two scdf-plots in the same graph. I have two input tables with one column each: > Targets <- read.table("/media/", sep="", header=T) > NonTargets <- read.table("/media/...", sep="", header=T) > head(Targets) V1 1 3.160514 2 6.701948 3 4.093844 4 1.992014 5 1.604751 6 2.

Re: [R] gdata selectively not working

2013-04-02 Thread Robin Jeffries
into Gdata. If I move it into another location, say C:/Temp then its fine. Annoying, but I will have to work around it for now. -Robin On Tue, Apr 2, 2013 at 4:41 AM, Paul Johnson wrote: > > On Apr 2, 2013 1:28 AM, "Robin Jeffries" > wrote: > > > > I can u

[R] gdata selectively not working

2013-04-01 Thread Robin Jeffries
g perl at C:\Perl64\bin\perl.exe Converting xls file “C:/Dropbox/R/library/gdata/xls/ExampleExcelFile.xlsx” to csv file “C:\Users\Robin\AppData\Local\Temp\RtmpWkmGgn\file1bccd743d36.csv” ... Executing ' "C:\Perl64\bin\perl.exe" "C:/Dropbox/R/library/gdata/perl/ xls2c

[R] gls + summary assumptions

2013-03-29 Thread Robin Caillon
Dear R users,I proceeded to a regression through the gls fonction (package nlme) with the following code: >a1=read.table("total25.txt",header=TRUE)>a1$T=factor(a1$T)>m2=gls(Res~ModeF*T,a1)>m2>summary(m2) I used gls fonction because it deals with heteroskedasticity and I would like you to confirm

[R] facet plot

2013-01-31 Thread Robin Mjelle
Hi all, I want to plot a facet plot with column names as x and column values as y. One plot for each row. here is part of my dataset: Gene T0h T0.25h T0.5h T1h T2h T3h T6h T12h T24h T48h NM_001001130 68 95 56 43 66 62 68 90 63 89 NM_001001144 0 1 4 0 1 1 1 4 1 2 NM_001001152 79 129 52 50 2

[R] Change class of elements in list

2012-12-26 Thread Robin Corrià
") Then I want to write each element in the new list as a TIFF file, with the name of the elements in the list. This also works for a single object in package "rgdal": writeGDAL(b, "sp1.TIFF") Many thanks, Robin

[R] Single node in tree

2012-12-15 Thread Robin Davies
Hi there, I'm new to R and need some help. I have a dataset of 30,000 records with a response (1/0) indicator resulting in a response rate of 29%. I have 1 categorical predictor variable (gender - M/F) and two continuous variables ("score" and age). When I create an rpart model, I only get one

[R] Subsetting with missing data

2012-08-15 Thread Robin Jeffries
the rows where a$y==0, i'm getting where they're 0, OR NA. ? Again I feel like either something was changed when I wasn't looking.. or I'm reaaly forgetting something important. Thanks, Robin Jeffries MS, DrPH Candidate Department of Biostatistics, UCLA 530-633-STAT(7828) r

[R] [R-pkgs] new package on CRAN: multivator

2012-02-15 Thread robin hankin
Dear list, The new package 'multivator' is now available on CRAN. This presents a multivariate generalization of the emulator package. The corresponding JSS article is: Robin K. S. Hankin (2012), "Introducing multivator: A Multivariate Emulator", Journal of Statistical S

Re: [R] Executable expressions

2012-01-18 Thread Robin Cura
Hi eval(parse(text=a)) should do the trick :) Cheers, Robin 2012/1/18 Ajay Askoolum > Given > > a<-"c(1,2,3,4,5)" > > How can I evaluate the variable a to return a (numeric) vector comprising > of 1,2,3,4,5? Thanks. > >

Re: [R] Improve a browse through list items - Transform a loop to apply-able function.

2011-12-16 Thread Robin Cura
Thanks to all of you for those answers, it now works and it's way faster than it used to be ;) Especially, converting my list of matrix to a 3-dimensionnal array simplifies a lot the statistics I have to run on my data :) Thanks again, Robin 2011/12/14 Patrizio Frederic > Hi robin, &

[R] Improve a browse through list items - Transform a loop to apply-able function.

2011-12-12 Thread Robin Cura
and column number to iterate. I succeeded improving my script duration a lot, but such loops are really long to run, considering that my lists contains like 100 dataframes, who all contains thousands of values. Any help would be really appreciated Thanks in advance, Robin [[alternati

[R] Multiple selection, renaming and saving the results

2011-11-25 Thread Robin Corrià
Dear all, I have a big data frame: str(data1) 'data.frame': 18272 obs. of 11 variables: $ tag : int 11 12 13 15 17 18 19 100011 100012 100014 ... $ sp : Factor w/ 18 levels "acassp","acocar",..: 13 5 7 14 14 18 3 11 13 10 ... $ gx : num 20 10 35 68

[R] attach 'name' argument ignored with a file?

2011-11-22 Thread Xavier Robin
Dear useRs & experRts, I have the feeling that the 'name' argument to the attach function is ignored when 'what' is a file name. Here is an example: > save(letters, file="letters.RData") > letters.env <- attach("letters.RData", name="letters") > search() > letters.env The name on the search path

[R] Error message after updating pkg spatstat

2011-11-08 Thread Robin W Hunnewell
in R_decompress1 Can anyone help? Thanks greatly, my session info is below. I am running R 2.13.1 on a Mac. Robin sessionInfo() R version 2.13.1 (2011-07-08) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) locale: [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packa

Re: [R] Equivalent of win.print for Linux

2011-10-28 Thread Xavier Robin
Thank you, it was exactly what I was looking for! Regards, Xavier Le 28. 10. 11 15:45, Prof Brian Ripley a écrit : > See the help for postscript ... especially the 'Printing' section. > > > On Fri, 28 Oct 2011, Xavier Robin wrote: > >> Hi! >> >>

Re: [R] Equivalent of win.print for Linux

2011-10-28 Thread Xavier Robin
inter=blah) Now the question is, is there a printer device equivalent to win.print for Linux? Thanks, Xavier On Fri, Oct 28, 2011 at 15:23, Raphael Saldanha wrote: > I have never used, but take a look on ?dev.print > > On Fri, Oct 28, 2011 at 11:16 AM, Xavier Robin wrote: > >> H

[R] Equivalent of win.print for Linux

2011-10-28 Thread Xavier Robin
Hi! In Windows the "win.print" function allows plotting directly to a printer (or copying an open device to the printer). This is very convenient to quickly print a plot once it looks good. Is there an equivalent function under Linux? For example through CUPS, IPP, LPD or other ? Obviously with

Re: [R] How can I check a package is installed or not?

2011-09-27 Thread Robin Cura
Hi I'm using this :) if (is.element('DESeq', installed.packages()[,1]) == FALSE) { install.packages('DESeq') } Robin 2011/9/27 Fabrice Tourre > Dear list, > > How can I detect a package is installed or not? If not, then install it. > > For example,

[R] Rect.hclust problem - "which=" not working

2011-09-16 Thread Robin Cura
obably isn't any random thing here afterall. Any guess ? Any idea how I could, in my script, got my boxes colored in the right order given in my which parameter ? Thanks, Robin Cura PS : A part of my code : par(mfrow=c(1,2), oma=c(2,2,2,2)) plot(hang = 0.2,mydata.cah, main="Arbre de

[R] Resources for utilizing multiple processors

2011-06-08 Thread Robin Jeffries
, and better yet, a third to run all the pre-and post- processing tidbits! So if anyone has any suggestions as to a direction I can look into, it would be appreciated. Robin Jeffries MS, DrPH Candidate Department of Biostatistics UCLA 530-633-STAT(7828)

[R] [R-pkgs] pROC 1.4.3: compare two ROC curves in R

2011-04-01 Thread Xavier Robin
find more information in our paper [4] and on pROC website: http://www.expasy.org/tools/pROC/ Hope you'll find it useful! Xavier Robin -- References: [1] DeLong ER, DeLong DM, Clarke-Pearson DL (1988) Comparing the areas under two or more correlated receiver operating characteristic curves:

Re: [R] Help with one of "those" apply functions

2011-02-02 Thread Robin Jeffries
Thanks Steve, I needed the alternative. tapply worked for my toy example, but it didn't for my real example. it might be b/c it was in a data frame, but i'm not sure. Using plyr did work however. Robin Jeffries MS, DrPH Candidate Department of Biostatistics UCLA 530-624-0428 On

[R] Help with one of "those" apply functions

2011-02-02 Thread Robin Jeffries
easurements I'd imagine it'll be some sort of *apply(value, nrep, sum) but I can't seem to land on the right format. Can someone give me a heads up as to what the correct syntax and function is? Danke, Robin Jeffries MS, DrPH Candid

Re: [R] Integration of two lines

2011-01-26 Thread Xavier Robin
Hans W Borchers wrote : > First define a function from those points: > > fx <- approxfun(x, f_x) > fy <- approxfun(y, f_y) > f <- function(x) abs(fx(x)-fy(x)) > > and now you can apply integrate() or trapz(): > > xx <- sort(c(x, y)) > yy <- f(xx) > trapz(xx, yy) > > tra

Re: [R] Integration of two lines

2011-01-25 Thread Xavier Robin
Le 25.01.2011 15:23, Rmh a écrit : > g <- function(x) abs(f1(x)-f2(x)) > > now you have one function and you can integrate it. Thank you Rich. Unfortunately I have no f1 and f2 functions, only a set of observed points on two lines - and no idea about the underlying distribution to create a funct

[R] Integration of two lines

2011-01-25 Thread Xavier Robin
Hello, I need to integrate the absolute difference between two lines measured on different points. # For example : x <- seq(0, 1, 1/100) f_x <- runif(101) + x y <- seq(0, 1, 1/23) f_y <- runif(24) + (1 - y) plot(x, f_x, type="l") lines(y, f_y) Then I would like to compute Integral( | f_x - f_y

Re: [R] Printing "pretty' vectors in Sweave

2011-01-19 Thread Robin Jeffries
Ah! I was always trying collapse with sep and other options. Not by itself. Perfect! And yes, that was my bad example. Robin Jeffries MS, DrPH Candidate Department of Biostatistics UCLA 530-624-0428 On Tue, Jan 18, 2011 at 10:27 PM, Joshua Wiley wrote: > Hi Robin, > > Have you look

[R] Printing "pretty' vectors in Sweave

2011-01-18 Thread Robin Jeffries
object, 1,2,3,4> myvec <- cat(c, sep=",") 1,2,3,4> myvec NULL and if I bypass the object assignment and put "My vector is (\Sweave{cat(c, sep=",")}). " prints out "My vector is (). " Suggestions? Robin Jeffries MS, DrPH Candidate Department of Biost

Re: [R] Logistic Regression Fitting with EM-Algorithm

2011-01-10 Thread Robin Aly
e method to my problem. Thanks in advance, Best Regards Robin Magder, L. S. & Hughes, J. P. Logistic Regression When the Outcome Is Measured with Uncertainty American Journal of Epidemiology, 1997, 146, 195-203 On 01/04/2011 12:36 AM, (Ted Harding) wrote: On 03-Jan-11 14:02:21, Robin Aly

[R] Logistic Regression Fitting with EM-Algorithm

2011-01-03 Thread Robin Aly
Hi all, is there any package which can do an EM algorithm fitting of logistic regression coefficients given only the explanatory variables? I tried to realize this using the Design package, but I didn't find a way. Thanks a lot & Kind regards

[R] How is MissInfo calculated? (mitools)

2010-11-07 Thread Robin Jeffries
64 % Thanks, Robin Jeffries MS, DrPH Candidate Department of Biostatistics UCLA 530-624-0428 [[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 h

Re: [R] Trouble installing gsl wrapper

2010-10-30 Thread robin hankin
dapt parts of this thread for the next release. Robin On Sat, Oct 30, 2010 at 8:14 AM, Gang Chen wrote: > You nailed it, Prof. Ripley! Thanks a lot... > > Gang > > On Sat, Oct 30, 2010 at 2:58 PM, Prof Brian Ripley > wrote: >> On Sat, 30 Oct 2010, Gang Chen wrote: >&g

Re: [R] GC verbose=false still showing report

2010-10-09 Thread Robin Jeffries
invisible(gc()) worked perfectly. Thanks Jeff. @ Josh: I know how to toggle showing/hiding command echos, but I haven't figured out how to toggle on/off any printed output. On Sat, Oct 9, 2010 at 5:10 PM, Robin Jeffries wrote: > I must be reading the help file for gc() wrong. I th

[R] GC verbose=false still showing report

2010-10-09 Thread Robin Jeffries
28.4 531268 28.4 Vcells 429302 3.3 20829406 159.0 55923977 426.7 I'm embedding this in an Sweave/TeX file, so I *really* can't have this printing out. Suggestions other than manually editing the TeX file? Robin Jeffries MS, DrPH Candidate Department of Biostatistics UCLA 53

Re: [R] boundary check

2010-09-24 Thread Robin Hankin
<- iden(M) : subscript out of bounds > > Or I must be wrong somewhere. > > > Feng > > > On Sep 24, 12:39 pm, Robin Hankin wrote: > >> Hello >> >> convex hulls in large numbers of dimensions are hard. >> >> For your problem, though, o

Re: [R] boundary check

2010-09-24 Thread Robin Hankin
225 -1.035694 > > is inside the boundary of X or not. I know it's easy to do it with 1-D or > 2-D, but I don't knot how to manage it when the dimension is large. > > Can someone give a hint? Thanks in advance! > > > Feng > > -- Robin K. S. Hankin Unce

[R] Lattice xyplots plots with multiple lines per cell

2010-08-13 Thread Robin Jeffries
hing like mean(outcome) ~ gender + gradelevel. However, I can't figure out how I could get both control and intervention lines in the same plot. Any suggestions? What i'm doing now -works-, but just seems to be the long way around. -Robin [[alternative HTML v

[R] simple table/matrix problem

2010-07-30 Thread Robin Hankin
ows 'x' has 2 bats, 'y' has zero bats, and 'z' has 3 bats and so on for each line. The real application would have a matrix of size ~10 by ~1. -- Robin K. S. Hankin Uncertainty Analyst University of Cambridge 19 Silver Street Cambridge CB3 9EP 01223-764877 ___

[R] simple apply syntax

2010-07-11 Thread Robin Jeffries
) Thanks, Robin [[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 http://www.R-project.org/posting-guide.html and provide commented, minimal

Re: [R] Function to compute the multinomial beta function?

2010-07-06 Thread Robin Hankin
beta function is Beta(n1,n2,n2) = Gamma(n1)*Gamma(n2)*Gamma(n3)/Gamma(n1+n2+n3) > beta3<- function (n1, n2, n3) exp(lgamma(n1)+lgamma(n2)+lgamma(n3)-lgamma(n1+n2+n3)) > beta3(5,3,8) [1] 1.850002e-07 -- Robin K. S. Hankin Uncertainty Analyst University of Cambridge 19 Silver St

Re: [R] Apply a shift which is a function of the array.

2010-07-02 Thread Robin Hankin
_ 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. -- Robin K. S. Hankin Uncert

Re: [R] Apply a shift which is a function of the array.

2010-07-02 Thread Robin Hankin
Hello Jim you can use ashift() from the same library which does (I think) what you want. HTH, Robin On 07/02/2010 12:05 PM, Jim Hargreaves wrote: Dear List, I have a 2,000x10,000 array of time domain data which when plotted draws a distinct pulse. The matrix is 10,000 pulses of

Re: [R] table() of a factor

2010-06-29 Thread Robin Hankin
thanks everyone. I think the motto should be "always specify the levels of a factor when you create it if you possibly can". best wishes Robin On 06/29/2010 12:39 PM, Felix Andrews wrote: Just use factor(), not levels(); you can pass a factor to factor() too. x<- fa

[R] table() of a factor

2010-06-29 Thread Robin Hankin
ls of x: > levels(x) <- c("a","b","c","d") > table(x) x a b c d 3 1 1 0 > because this records the single "d" in the original 'x' as a "c". What I want is: a b c d 3 1 0 1 How to get this from 'x'?

Re: [R] Counting indexes

2010-05-25 Thread Robin Jeffries
Awesome! Thanks:) On Tue, May 25, 2010 at 9:40 PM, Erik Iverson wrote: > Robin Jeffries wrote: > >> Hallo! >> >> I have a vector of ID's like so, >> id <- c(1,2,2,3,3,3,4,5,5) >> >> I would like to create a [start,stop] pair of vectors t

[R] Counting indexes

2010-05-25 Thread Robin Jeffries
much in R, so any pointers would be helpful. Many thanks! ~~~ -Robin Jeffries Dr.P.H. Candidate in Biostatistics UCLA School of Public Health rjeffr...@ucla.edu 530-624-0428 [[alternative HTML version deleted]] __ R-help@

[R] sparse matrices in lme4

2010-05-24 Thread Robin Jeffries
I read somewhere (help list, documentation) that the random effects in lme4 uses sparse matrix "technology". I'd like to confirm with others that I can't use a sparse matrix as a fixed effect? I'm getting an "Invalid type (S4) " error. Thanks. ~~~

[R] Regression with sparse matricies

2010-05-22 Thread Robin Jeffries
glm, some way that it will recognize a sparse matrix and avoid large matrix inversions? -Robin [[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] Indexing with sparse matrices (SparseM)

2010-05-19 Thread Robin Jeffries
can provide a few suggestions or pointers? I'm not hooked on this package either, it was just the first one I came across via Rseek. Many thanks, -Robin [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat

[R] Source.R file from cmd line

2010-05-08 Thread Robin Jeffries
line arguments to the command line in a system task. Thanks, ~~~ -Robin Jeffries Dr.P.H. Candidate in Biostatistics UCLA School of Public Health rjeffr...@ucla.edu 530-624-0428 [[alternative HTML version deleted]] __ R-h

Re: [R] Obvious reason for not looping twice?

2010-04-26 Thread Robin Jeffries
Seriously! That easy! I kept thinking that xtab would just give me frequencies of how many times the combination occurred, and not the values themselves. Thanks! -Robin On Mon, Apr 26, 2010 at 7:40 AM, Henrique Dallazuanna wrote: > Try this; > > xtabs(y ~ st + vc, data = x) >

Re: [R] Obvious reason for not looping twice?

2010-04-26 Thread Robin Jeffries
the row that it's currently on, but then won't continue to loop. -Robin On Sun, Apr 25, 2010 at 4:44 PM, Peter Alspach < peter.alsp...@plantandfood.co.nz> wrote: > Tena koe Robin > > Do you get an error or warning? > > It may have something to do with how == tr

[R] Obvious reason for not looping twice?

2010-04-25 Thread Robin Jeffries
c$st)),length(unique(svc$vc))), dimnames=list(unique(svc$st), unique(svc$vc))) for (i in 1:length(unique(svc$st))) { for (j in 1:length(unique(svc$vc))){ lookup.svc[i,j] <- svc[svc$st == unique(svc$st)[i] & svc$vc == unique(svc$vc)[j], 4] }} Thanks, Robin ~~~ -Rob

Re: [R] Frequency table

2010-04-16 Thread Robin Evans
t; -- > Kevin Turner > Department of Geography > and Environmental Studies > Wilfrid Laurier University > Waterloo, Ontario > [[alternative HTML version deleted]] -- Robin Evans Statistics Department University of Washington www.stat.washington.edu/~rje42 __

Re: [R] Vectorized forms of isTRUE, identical and all.equal?

2010-04-07 Thread Robin Evans
On 7 April 2010 16:27, Steve Lianoglou wrote: > On Wed, Apr 7, 2010 at 7:16 PM, Robin Evans wrote: >> On 7 April 2010 16:12, Steve Lianoglou >> wrote: >>> Hi, >>> >>> On Wed, Apr 7, 2010 at 5:44 PM, Robin Evans >>> wrote: >>>> De

Re: [R] Vectorized forms of isTRUE, identical and all.equal?

2010-04-07 Thread Robin Evans
On 7 April 2010 16:12, Steve Lianoglou wrote: > Hi, > > On Wed, Apr 7, 2010 at 5:44 PM, Robin Evans wrote: >> Dear all, >> >> I'm wondering if there exist vectorized forms of 'isTRUE()', >> 'identical()' and 'all.equal()'.

[R] Vectorized forms of isTRUE, identical and all.equal?

2010-04-07 Thread Robin Evans
so on. However, using sapply() with identical() is very slow because it makes so many separate function calls: x = rbinom(1e4, 1, 0.5) system.time(sapply(x, function(x) isTRUE(all.equal(x, 0 system.time(abs(x) < .Machine$double.eps^0.5) The latter version is fast, but potentially danger

Re: [R] add points to 3D plot using p3d {onion}

2010-01-27 Thread Robin Hankin
is: data(bunny) p3d(head(bunny,100),d0=2,theta=3) points(tail(bunny), col='blue') You'd want the call to points() to "remember" theta=3, and possibly d0=2 as well. Although I can see a hack I'd be very happy to help you offline. best wishes Robin Bradley

[R] (Solved) Problems completely reading in a "large" sized data set

2010-01-20 Thread Robin Jeffries
I'm not quite sure why, but reading in the *sorted* data (imported into Excel, sorted, written to a text file) worked perfectly fine with read.delim(). Thanks to those that replied! -Robin [[alternative HTML version deleted]] __ R-h

[R] Problems completely reading in a "large" sized data set

2010-01-20 Thread Robin Jeffries
y.size(max=FALSE) [1] 251.09 As a side question, i'm reading it all in as characters for now because when i tried to define a vector of column types wht <-list(rep("character",7),0,"logical",0,"character")) to use in scan(), it still read everything in as c

Re: [R] Generating data from Null Distribution

2010-01-06 Thread Robin Hankin
ndom samples using the Metropolis-Hastings algorithm. HTH Robin Jim Silverton wrote: Hello everyone, Can someone tell me exactly how to generate data from a null distribution for the fisher exact test? I know I have to use the hypergrometric but exactly what commands do I use? Jim [

Re: [R] expand.grid game

2009-12-21 Thread Robin Hankin
g like: all <- 0 for(i in (2:8)){ jj <- blockparts(rep(9,8),17) all <- all + dim(jj) } Or am I missing something?! Ted. On 21-Dec-09 07:57:32, Robin Hankin wrote: Hi library(partitions) jj <- blockparts(rep(9,8),17) dim(jj) gives 318648 HTH rksh baptiste augui

Re: [R] expand.grid game

2009-12-21 Thread Robin Hankin
ser system elapsed 0.160 0.068 0.228 In some ways I think this is close to Hadley's suggestion, though I didn't know how to implement it. Thanks a lot to everybody who participated, I have learned interesting things from a seemingly innocuous question. Best regards, baptiste 200

Re: [R] expand.grid game

2009-12-21 Thread Robin Hankin
way to do this in R. Otherwise, I believe what I'm after is some kind of C or C++ macro expansion, because the number of loops should not be hard coded. Thanks for any tips you may have! Best regards, baptiste __ R-help@r-project.org mailing list h

Re: [R] Fishers exact test at < 2.2e-16

2009-12-17 Thread Robin Hankin
e-16 Kind regards, Søren __ 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

Re: [R] how to creat a matrix

2009-12-11 Thread Robin Hankin
p://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Robin K. S. Hankin Uncertainty Analyst University of Cambridge 19 Silver Street Cambridge CB3 9EP 01223-764877 __ R-help@r-project.or

Re: [R] access elements of a named list using a factor

2009-10-23 Thread Robin Hankin
uot;pigs", "slugs")) jj <- list(pigs = 1:10, slugs = 1:3) jj[levels(f)[1]] jj[[levels(f)[1]]] Best, Dimitris Robin Hankin wrote: Hi I have a factor 'f' and a named list 'jj'. I want names(jj) to match up with levels(f). How do I use levels(f) to a

[R] access elements of a named list using a factor

2009-10-23 Thread Robin Hankin
> jj <- list(pigs=1:10,slugs=1:3) My attempts to produce jj$pigs all give errors: > jj$levels(f)[1] Error: attempt to apply non-function > do.call("$",jj,levels(f)[1]) Error in if (quote) { : argument is not interpretable as logical > "$"(jj,levels(f)[1]) Err

Re: [R] reference on fisher.test()

2009-10-16 Thread Robin Hankin
discussion in the vignette("fishervig") in the aylmer package helpful. HTH Robin Peter Dalgaard wrote: Peng Yu wrote: On Thu, Oct 15, 2009 at 4:19 PM, RICHARD M. HEIBERGER wrote: On Thu, Oct 15, 2009 at 4:56 PM, Peng Yu wrote: Can somebody point me a book on Fisher's exact t

[R] generalization of tabulate()

2009-10-16 Thread Robin Hankin
d[j] <- d[j]+1 } } } S <- cbind(S,d) Anyone got anything better before I try C? -- Robin K. S. Hankin Uncertainty Analyst University of Cambridge 19 Silver Street Cambridge CB3 9EP 01223-764877 __ R-help@r-project.org mailing list https://sta

Re: [R] S4 tutorial

2009-10-14 Thread Robin Hankin
Peng the Brobdingnag package includes a vignette that gives a step-by-step guide to creating a simple package that uses S4. best wishes Robin Peng Yu wrote: I'm looking for some tutorial on S4. I only find the following one, which is not in English. Can somebody let me know if there i

Re: [R] sparse vectors

2009-09-08 Thread Robin Hankin
ways sorted, which migh save some searching time. Any thoughts anyone? best wishes Robin Benilton Carvalho wrote: library(Matrix) a = sparseMatrix(i=c(20, 30, 1), j=rep(1, 3), x=c(2.2, 3.3, 4.4)) b = sparseMatrix(i=c(3, 30), j=rep(1, 2), x=c(0.1, 0.1), dims=dim(a)) theSum = a+b s

[R] sparse vectors

2009-09-08 Thread Robin Hankin
2 3.4 4.4 > See how the value for index=30 (being common to both) is 3.4 (=3.3+0.1). What's the best R idiom to achieve this? -- Robin K. S. Hankin Uncertainty Analyst University of Cambridge 19 Silver Street Cambridge CB3 9EP 01223-764877 _

Re: [R] Must be a better way to collate sequenced data

2009-06-08 Thread Burke, Robin
and re-merging may do the trick, providing I can re-merge in order of the transformed time value. That would avoid the costly sort operation in aggregate. Robin Burke Associate Professor School of Computer Science, Telecommunications, and Information Systems DePaul University (currently on leav

[R] Must be a better way to collate sequenced data

2009-06-07 Thread Burke, Robin
tart[utime.data[i,"USER"]]; # look up maximum user count umax <- subset(utime.userMax, USER==as.numeric(utime.data[i, "USER"]))["USER_COUNT&qu

Re: [R] Goldbach partitions code

2009-03-03 Thread Robin Hankin
Hi interesting blog! not strictly relevant, but there are various number-theoretic functions implemented in the elliptic package which you might find useful. best wishes Robin murali.me...@fortisinvestments.com wrote: Folks, I put up a brief note describing my naive attempts to compute

Re: [R] R parser for If-else

2009-02-25 Thread Robin Hankin
.R-project.org/posting-guide.html D> and provide commented, minimal, self-contained, reproducible code. __ 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-gu

[R] swich off printed info

2009-02-18 Thread robin
d be set to FALSE. How can I switch off this type of message ? I think of something similar to setting warns option to -1 or similar to a function that could "handle" the message and throw it out ( a sort of try function for non error messages ... ) Thank you in advance fo

Re: [R] How to handle large numbers?

2009-02-11 Thread Robin Hankin
d be close to zero. My question is whether there is a general way to solve this kind of question or should I do some settings before computing? Thanks in advance! Feng -- Robin K. S. Hankin Uncertainty Analyst University of Cambridge 19 Silver Street Cambridge CB

  1   2   >