similar to: choosing best 'match' for given factor

Displaying 20 results from an estimated 1000 matches similar to: "choosing best 'match' for given factor"

2012 Sep 16
1
possible TZ bug in parseISO8601 - "Error in if (length(c(year, month, day, hour, min, sec)) == 6 && c(year, : [...]"
Hey all, Virgin post to this list - hope I've got it right ;o) I've been learning R intensively the last two weeks and gone from newbie status to *reasonably* comfortable with it. Here's an issue I just cannot solve however as it appears to be some kind of bug in R itself. But I won't claim that for sure. I have a function as follows: FindHighRow <- function(searchVector,
2012 Jul 30
2
distance matrix and hclustering
Dear R Users,i am very new to R. I want your help on an issue regarding distance matrix and cluster analysis i had discharge data of 4 rivers(a,b,c,d) in 4 vectors each having 364 values > dput(qmu)structure(list(a = c(0.26, 0.25, 0.25, 0.25, 0.24, 0.23, 0.22, 0.21, 0.21, 0.21, 0.2, 0.19, 0.19, 0.19, 0.19, 0.18, 0.18, 0.18, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17,
2013 May 15
1
x and y lengths differ
I have a problem with R. I try to compute the confidence interval for my df. When I want to create the plot I have this problem: Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' and 'y' lengths differ. I try this code: library(dplR) df.rwi <- detrend(rwl = df, method = "Spline",nyrs=NULL) write.table(df.rwi,file="rwi.txt",quote=FALSE,row.names=TRUE)
2011 Sep 22
4
R CMD check file issues
This problem is likely to be specific to Windows, and particularly Win7. After a successful build of a package (R CMD build addendum), I immediately run an R CMD check for the same package. Not always, but _very_ often, I get the following error: C:\Users\nisabbe\Documents\@Doctoraat\R>R CMD check addendum Loading required package: tcltk Loading Tcl/Tk interface ... done Loading
2011 Mar 04
3
Generic mixup?
Hello list. This is from an R session (admittedly, I''m still using R 2.11.1): > print function (x, ...) UseMethod("print") <environment: namespace:base> > showMethods("print") Function "print": <not a generic function> Don''t the two results contradict each other? Or do I have a terrible misunderstanding of what
2011 Jan 20
2
Using a list as multidimensional indexer
Hello list. Another 'puzzle' for which I don't have a clean solution. Say I have a multidimensional object, e.g.: Mm<-matrix(1:6, nrow=2, dimnames=list(c("a","b"), c("g","h","i"))) And on the other hand I have a list Ind<-list("b","g") This holds, for each dimension, an indexer for that dimension. Now I would
2006 Sep 18
2
problems in sourcing R script
Dear list, First my information: platform i386-pc-linux-gnu arch i386 os linux-gnu system i386, linux-gnu status major 2 minor 3.1 year 2006 month 06 day 01 svn rev 38247 language R version.string Version 2.3.1 (2006-06-01) Now my question: How is it possible that a command in an R script is not
2010 Dec 08
2
problem accessing complex list data frames
Hi all. I am currently attempting to build a list of sparse matrixes. That I have already achieved, by > vmat <- list() > for (i in 1:n) { > vmat <- c(vmat, sparseMatrix(i,j,x=data) > } How I am trying to select those elements from the list where the column e.g. 999 is not null. I can do this for one of the sparse matrices with > which(vmat[[1]][,999] != 0) which
2011 Jan 28
2
Injecting code in a package?
Dear list, I''ve had this a few times now, and wonder if this is possible: I''m using a package, often for plotting something, but I want to tune the way the plotting goes, in a way that was not foreseen by the maker of the package. Now, most of the time, these kinds of R functions (say pkg::plot.something) call into other R functions (say pkg::plot.something.internal), and
2010 Oct 22
2
Linking to lapack
Hello all. I'm developing a package for R holding a Gibbs sampler, which tends to have better performance when written in C than in R. During each iteration in the Gibbs sampler, I need the inverse of a symmetric matrix. For this, I wish to use lapack, as is concisely suggested in "Writing R extensions", since this will have better performance than I could ever write myself. After
2011 Apr 01
3
programming: telling a function where to look for the entered variables
Hi there, Could someone help me with the following programming problem..? I have written a function that works for my intended purpose, but it is quite closely tied to a particular dataframe and the names of the variables in this dataframe. However, I'd like to use the same function for different dataframes and variables. My problem is that I'm not quite sure how to tell my function in
2011 Jan 28
1
plot not generic
Hello list. I was trying to see some of the code for plot.glmnet in package glmnet (this function name is in the documentation). After loading the library, I tried the obvious typing in the name, but I received a message telling me it could not be found. So I fiddled around a little, and noticed that R does not recognize ''plot'' as a generic function, and as such,
2011 Apr 29
2
abline outside of plot region
Hi R people. I ran into this problem: I created a plot with errbars, like this: > errbar(x=c(1,2,3,4), y=c(2,1,3,3), yminus=c(1.5,0.5,2.5,2.5), yplus=c(2.5,1.5,3.5,3.5)) Next, I wanted to accentuate some x value with an abline, like this: > abline(v=2) In one of my R sessions (which admittedly I have had open for quite a while now), the abline draws outside of the plotting region
2013 May 23
1
sample(c(0, 1)...) vs. rbinom
Greetings.? My wife is teaching an introductory stat class at UC Davis.? The class emphasizes the use of simulations, rather than mathematics, to get insight into statistics, and R is the mandated tool.?? A student in the class recently inquired about different approaches to sampling from a binomial distribution.? I've appended some code that exhibits the idea, the gist of which is that using
2010 Dec 07
1
Dataframe from list of similar lists: not _a_ way, but _the best_ way
Hi All. I often find myself in this situation: . Based on some vector (or list) of values, I need to calculate a few new values for each of them, where some of the new values are numbers, but some are more of descriptive nature (so: character strings) . So I use e.g. sapply, passing a custom function that returns a list with all the calculated values . The result of
2012 Jun 01
1
Dependencies on recommended packages
Dear all, I've recently had some issues getting my package to successfully "check". This was on R-Forge, so it's not obvious for me to provide SessionInfo or the likes (if necessary, Stefan can chime in?). After some research (mainly by Stefan Theussler, driving force behind R-Forge), this turned out to be the root cause: On R-Forge, the version of R installed was the
2011 Sep 22
1
R check error / update.packages
While building/checking a package of mine that depends on glmnet, I got the following message: * checking whether the name space can be loaded with stated dependencies ...Warn ing: running command ''"C:/Users/nisabbe/Documents/R/R-2.13.1/bin/i386/Rterm.exe" R_DEFAULT_PACKAGES=NULL --vanilla --slave -f C:\Users\nisabbe\AppData\Local\Tem p\RtmpZpjj07\Rin121ae93''
2011 Aug 10
2
glmnet
Hi All,  I have been trying to use glmnet package to do LASSO linear regression. my x data is a matrix n_row by n_col and y is a vector of size n_row corresponding to the vector data. The number of n_col is much more larger than the number of n_row. I do the following: fits = glmnet(x, y, family="multinomial")I have been following this
2010 Mar 31
1
Weird R behaviour?
Dear list, I have observed a weird behaviour from R --- apologies if I am missing something obvious! df3f826f28 df3f826f28 Say you type in R: >c.preec <- 10074 >c.gd <- 2200 >p1 <- .2 >c.neo <- p1*9451 + (1-p1)*3883 >n.preec <- 3710 >n.gd <- 2650 >n.neo <- 2120 >n.pcos <- 53000 >unit.met <- 94 >cost.met <- 94*n.pcos >effect <-
2013 Mar 06
3
About basic logical operators
Hello everyone,           I have a basic question regarding logical operators. > x<-seq(-1,1,by=0.02) > x   [1] -1.00 -0.98 -0.96 -0.94 -0.92 -0.90 -0.88 -0.86 -0.84 -0.82 -0.80 -0.78  [13] -0.76 -0.74 -0.72 -0.70 -0.68 -0.66 -0.64 -0.62 -0.60 -0.58 -0.56 -0.54  [25] -0.52 -0.50 -0.48 -0.46 -0.44 -0.42 -0.40 -0.38 -0.36 -0.34 -0.32 -0.30  [37] -0.28 -0.26 -0.24 -0.22 -0.20 -0.18 -0.16