[R] [R-pkgs] onetime 0.1.0: Run Code Only Once

2022-12-09 Thread David Hugh-Jones
Dear all, Onetime 0.1.0, a utility package of interest to package developers, is now on CRAN: https://cran.r-project.org/package=onetime Onetime uses lockfiles to perform an action only once (ever, or with an expiry date) on a given computer. For example, it can send a message or warning: for (

Re: [R] RGB -> CYMK, with consistent colors

2020-12-02 Thread Derek Jones
Martin, However after some testing. I totally agree that CMYK handling in R using pdf(..., colormodel = "cmyk") is not correct. Looking at the source code of the function PostScriptSetCol in file src/librarygrDevices/src/devPS.c the conversion to CMYK looks correct. Looking at the generated p

Re: [R] RGB -> CYMK, with consistent colors

2020-11-30 Thread Derek Jones
Martin, However after some testing. I totally agree that CMYK handling in R using pdf(..., colormodel = "cmyk") is not correct. I thought the issue may be OS specific, but I get similar behavior on a Mac. I have discovered the Cyan tool: http://cyan.fxarena.net/ and will try it out. As vario

Re: [R] RGB -> CYMK, with consistent colors

2020-11-29 Thread Derek Jones
Martin, Have you tried printed a few pages in CMYK? A monitor is based on mixing light using Red-Green-Blue. So it is not possible for the monitor to show CMYK which must be printed on paper to view correctly. Yes, I have printed some 'CMYK' pages. The blue is very obviously not cyan, as com

Re: [R] RGB -> CYMK, with consistent colors

2020-11-29 Thread Derek M Jones
t cyan, as compared to printing the RGB version. -- Derek M. Jones Evidence-based software engineering tel: +44 (0)1252 520667 blog:shape-of-code.coding-guidelines.com __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more,

[R] RGB -> CYMK, with consistent colors

2020-11-29 Thread Derek Jones
All, I used the very useful colorspace package for the plots in my book (pdf available here): http://knosof.co.uk/ESEUR/ The color makes the plots look great, on screen. To get lots printed, the printer requires converting the images to use cmyk (a common requirement for larger printers, I'm to

Re: [R] Why does a 2 GB RData file exceed my 16GB memory limit when reading it in?

2020-09-02 Thread David Jones
in an attempt to free all possible memory before rereading the workspace back in). On Wed, Sep 2, 2020 at 1:27 PM John via R-help wrote: >> On Wed, 2 Sep 2020 13:36:43 +0200 >> Uwe Ligges wrote: >> >> > On 02.09.2020 04:44, David Jones wrote: >> > > I ran a num

[R] Why does a 2 GB RData file exceed my 16GB memory limit when reading it in?

2020-09-01 Thread David Jones
I ran a number of analyses in R and saved the workspace, which resulted in a 2GB .RData file. When I try to read the file back into R later, it won't read into R and provides the error: "Error: cannot allocate vector of size 37 Kb" This error comes after 1 minute of trying to read things in - I pr

[R] Multinomial Logistic Regression with Complex Survey using 'Survey' Package in R

2018-06-19 Thread Mackenzie Jones
Dear R Users, I want to use a multinomial logistic regression model with survey data in the “survey” package. The original package did not have a function for multinomial logistic regression, so Thomas Lumley suggested creating replicate weights for the survey and doing a multinomial regression

[R] [R-pkgs] Package huxtable 0.2.1 on CRAN

2017-04-26 Thread David Hugh-Jones
Hi all, I'm happy to announce that the huxtable package version 0.2.1 is on CRAN. huxtable is an R package to create LaTeX and HTML tables, with a friendly, modern interface. Features of 0.2.1 include: - Export to LaTeX, HTML, Word and Markdown - Easy integration with knitr and rmarkdown documen

[R] Options for bootstrapped CIs for indirect effect: Nested data structure, missing data, and fully continuous X variable

2017-03-19 Thread David Jones
I am looking for a package or other solution in R that can evaluate indirect effects and meets all of the following criteria: * Can create bootstrapped CIs around an indirect effect (or can implement any other method of creating asymmetric CIs) * Can address nested data (e.g., through multilevel/m

[R] How to implement "zero-overhead" code re-use (a la Python, Perl, etc.) in R?

2016-09-30 Thread Kynn Jones
I'm collaborating in a long-running research project that, over the years, has accummulated source code (written in-house) in several languages: Python, Perl, Mathematica, MATLAB. Recently I have started writing source code in R for this project, and I am having trouble incorporating it into our e

Re: [R] [FORGED] Time Series Daily Frequency Part of a Year

2015-10-08 Thread zod jones
Thanks for the reply. I thought I'd find more on this by searching for course enrollment forecasting because the events I'm dealing with are essentially like courses that need to be compared year on year (over many years). But the info I found relating to models for enrollment were only aggregated

[R] Time Series Daily Frequency Part of a Year

2015-10-07 Thread zod jones
My data consist of daily sales figures for multiple products but only for a 3 month period each year (Oct., Nov., Dec). The goal is to forecast the daily sales figures for the following year *by day* (the following Oct., Nov., Dec.) So, I'd like to forecast what sales for product X will be on Nov.

[R] [R-pkgs] anim.plots - simple animated plots for R

2014-11-10 Thread David Hugh-Jones
Announcing the first release of anim.plots, a package for simple animated plots in R, using Yihui Xie's animation package. http://cran.r-project.org/web/packages/anim.plots/index.html Functions are very similar to basic R graphics. Currently the package includes animated versions of plot, barplot

[R] Changepoint analysis--is it possible to attribute changpoints to explanatory variables?

2014-09-16 Thread Jones, Kristopher@DWR
Hello, I would like to evaluate the relationship between flows and phytoplankton abundance (or Chlorophyll a concentrations) using a changepoint analysis.  Specifically, I have two study questions: Study Question 1: Are there certain flow thresholds that result in spikes in phytoplankton abun

[R] Fwd: problem with kmeans

2014-04-28 Thread cassie jones
Dear R-users, I am trying to run kmeans on a set comprising of 100 observations. But R somehow can not figure out the true underlying groups, although other software such as Jmp, MINITAB are producing the desired result. Following is a brief example of what I am doing. library(stringdist) test=c

Re: [R] mean

2013-08-30 Thread Albyn Jones
It would be easier to diagnose the problem if you included an example illustrating exactly what you did. I'll guess: > a <- list(3,4,5) > mean(a) [1] NA Warning message: In mean.default(a) : argument is not numeric or logical: returning NA > mean(as.numeric(a)) [1] 4 But that's just a guess, as

Re: [R] problem with input of integrate function

2013-06-16 Thread cassie jones
Hi David, Thank you so much. -Cassie On Sun, Jun 16, 2013 at 9:19 PM, David Winsemius wrote: > > On Jun 16, 2013, at 7:15 PM, David Winsemius wrote: > > > > > On Jun 16, 2013, at 6:46 PM, cassie jones wrote: > > > >> Dear R-users, > >> > >&g

[R] problem with input of integrate function

2013-06-16 Thread cassie jones
Dear R-users, I am trying to integrate a function using integrate command in R. The function is as follows, integrand function(x,a) { exp(-0.5*a*(1+x^2))/(1+x^2) } Now while I want to integrate it using the command integrate, I get the following error, integrate(integrand(x,2),0,inf) Error

[R] simulation from truncated skew normal

2013-06-11 Thread cassie jones
Hello R-users, I am trying to simulate from truncated skew normal distribution. I know there are ways to simulate from skewed normal distribution such as rsn(sn) or rsnorm(VGAM), but I could not find any command to simulate from a truncated skew-normal distribution. Does anyone know how to do that

Re: [R] sample(c(0, 1)...) vs. rbinom

2013-05-23 Thread Albyn Jones
s me", I have no clue why you think it does! It is a curiosity. albyn On Thu, May 23, 2013 at 04:38:18PM +, Nordlund, Dan (DSHS/RDA) wrote: > > -Original Message- > > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > > project.org] On Behalf Of Alby

Re: [R] sample(c(0, 1)...) vs. rbinom

2013-05-23 Thread Albyn Jones
After a bit of playing around, I discovered that sample() does something similar in other situations: set.seed(105021) sample(1:5,1,prob=c(1,1,1,1,1)) [1] 3 set.seed(105021) sample(1:5,1) [1] 2 set.seed(105021) sample(1:5,5,prob=c(1,1,1,1,1)) [1] 3 4 2 1 5 set.seed(105021) sample(1:5,5)

Re: [R] the joy of spreadsheets (off-topic)

2013-04-27 Thread Albyn Jones
I once had a discussion with an economist who told me in almost these exact words: "I don't care what the data say, the theory is so clear". albyn On 2013-04-26 9:30, William Dunlap wrote: The prior for the incompetence/malice question is usually best set pretty heavily in favour of incompete

Re: [R] problem with the image command

2013-04-09 Thread cassie jones
t;, yaxs = "i", xlab, ylab, > breaks, oldstyle = FALSE, useRaster, ...) > > Regards, > Pascal > > > > On 04/10/2013 10:07 AM, cassie jones wrote: > >> Hello R-users, >> >> I am trying to do an image plot where I have been given latitudes

[R] problem with the image command

2013-04-09 Thread cassie jones
Hello R-users, I am trying to do an image plot where I have been given latitudes, longitudes and the values at the corresponding locations. A sample of the data is given as follows: values=c(0,1,0,0,0,0,2,2,0,0) lat=c(29.6660,29.6756,29.3492,29.2654,29.2827,29.4070,35.3510,35.6590,35.7587,38.2

Re: [R] prop.test vs hand calculated confidence interval

2013-04-03 Thread Albyn Jones
w.functionaldiversity.org > > ______ > 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-con

Re: [R] prop.test correct true and false gives same answer

2013-03-27 Thread Albyn Jones
abble.com. > > __ > 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, reproduci

[R] Non-convergence error for GLMM with LME4?

2013-03-23 Thread Leanna Jones
Hello! I am trying to run a GLMM using LME4, and keep getting the warning message: "In mer_finalize(ans) : false convergence (8)" I am quite new to R, and in looking into this thus far, it appears that there are a variety of reasons why this might occur, such as needing to standardize some par

Re: [R] order statistic of multivariate normal

2013-03-21 Thread Albyn Jones
> 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. > -- Albyn Jones Reed College jo...@reed.e

Re: [R] Exponentiate very large numbers

2013-02-05 Thread Albyn Jones
I stayed out of this one thinking it was probably a homework exercise. After others have responded, I'll go ahead with my gloss on Bill's function... The specific problem is really of the form exp(a) - exp(a+eps) = exp(a)*(1-exp(eps)) So even though we can't compute exp(1347), we can compu

Re: [R] importing data

2013-01-26 Thread David Hugh-Jones
Hi Ray, Comments below: On 26 January 2013 09:03, Ray Cheung wrote: [snip] > ###FUNCTION TO READ FILES > little_helpful <- function(n) { > file_name <- paste0("C:/.../data", n, ".dat") > read.table(file_name) > } > > ###RETURN AN OBJECT WHICH CHECKS FOR THE EXISTENCE OF FILES > check <- function

Re: [R] Loop question?

2013-01-26 Thread David Hugh-Jones
Here's a toy example which you can apply the logic of: dfr <- expand.grid(1:3,1:2) results <- apply(dfr, 1, sum) dfr[results==4,] On 25 January 2013 22:19, Andras Farkas wrote: > > Dear All > > I have the following data (somewhat simplyfied): > > TINF <-1 > a <-c(500,750,1000,1250,1500,1750,

[R] sm prediction

2013-01-02 Thread Tom Jones
How can I predict new data with a regression by the sm package. predict() does not work for the sm results and I can't find any newdata option. [[alternative HTML version deleted]] __ R-help@r-project

[R] Multiple Range Means Test

2012-11-24 Thread Amanda Jones
, trt, DFerror, MSerror, alpha = 0.05, group=TRUE, main = NULL) When I try to run it as duncan.test(aov, dat, 6, .297, alpha=.05, group=TRUE, main=NULL) it gives me an error message that I have differing rows, 0 and 163. 163 is the correct number, where is it getting the 0 from? Thank you, Amanda

Re: [R] Comparing linear regression coefficients to a slope of 1

2012-11-24 Thread Albyn Jones
Dear Cat My apologies for presuming... Here's a "primitive" solution: compute a t-statistic or CI. t = (beta-hat - 1)/SE(beta-hat), compare to qt(.975, res.df) Or Better, compute the 95% confidence interval beta-hat + c(-1,1)*qt(.975, res.df)*SE(beta-hat) albyn On 2012-11-24 18:05, Catri

Re: [R] Comparing linear regression coefficients to a slope of 1

2012-11-24 Thread Albyn Jones
!! > > Cat > > [[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

Re: [R] Coefficient of Variation, NA, Aggregate

2012-11-19 Thread Amanda Jones
47.14045 0 > > A.K. > > > > > - Original Message - > From: Amanda Jones > To: r-help@r-project.org > Cc: > Sent: Monday, November 19, 2012 4:01 PM > Subject: [R] Coefficient of Variation, NA, Aggregate > > Hello helpers, > > I have a two par

[R] Coefficient of Variation, NA, Aggregate

2012-11-19 Thread Amanda Jones
unction to work? SECONDLY, how can I then get that function to work within an aggragate? Do I still use >aggregate(. ~ subspecies, data = rowleyi, CV, na.rm=TRUE) #where subspecies is >the header for rows? This has worked for mean, std.error, sd, etc. Th

Re: [R] How to do an infinite sum in R

2012-11-16 Thread Albyn Jones
tps://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. > -- Albyn Jones Reed College jo...@reed.edu __ R-hel

Re: [R] how to generate a set of random numbers that sum to 1 with uniform distribution of elements

2012-11-07 Thread Albyn Jones
; Sent from the R help mailing list archive at Nabble.com. > > __ > 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, m

Re: [R] peer-reviewed (or not) publications on R

2012-10-30 Thread Albyn Jones
More links on reproducible research: Opinion: Open and Free: Software and Scientific Reproducibility Seismological Research Letters Volume 83 · Number 5 · September/October 2012 Reproducible Research in Computational Science Roger D. Peng Science 2 December 2011: 1226-1227. albyn On 2012-10-30

[R] data structure for plsr

2012-10-04 Thread Emma Jones
I am having a similar problem understanding the data structure of the "yarn" dataset described in the "[R] data structure for plsr" posts. I have spectroscopic data I'd like to run through a PLSR and have read the tutorial series, but still do not understand the data format required for the code to

Re: [R] Mac Text editors

2012-09-26 Thread Albyn Jones
Have you looked at aquamacs? (emacs for the mac). its at aquamacs.org. albyn On 2012-09-26 17:48, Steven Wolf wrote: Hi everyone, I've recently moved from using a windows machine to a Mac (some might call it an upgrade, others not…I'll let you be the judge). Once I started using Notepad ++ on

Re: [R] Loading Chess Data

2012-09-02 Thread jones
You might take a look at the link titled "Download Rating List", in the blue box on the right side of that page... albyn On 2012-09-02 9:41, David Arnold wrote: All, What would be the most efficient way to load the data at the following address into a dataframe? http://ratings.fide.com/top.

Re: [R] Course

2012-08-28 Thread Albyn Jones
TEC/UFPA/PPGEM/GPEMAT > > [[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 &g

[R] using eval to handle column names in function calling scatterplot graph function

2012-08-10 Thread Elaine Jones
]> yvar [1] "C1" Is this a quirk peculiar to scatterplot? (Note that boxplot which has similar usage worked.) I would appreciate any suggestions for how to resolve this, including a different (better) approach. mydf can have many different parameters (parmnames), so I am trying

Re: [R] deleting columns from a dataframe where NA is more than 15 percent of the column length

2012-08-06 Thread Faz Jones
4.08768 > 4 14.95139 14.01923 > 5 14.99517 15.91936 > 6 14.46359 14.07573 > 7 15.09702 13.94888 > 8 15.99967 14.97171 > 9 15.51924 15.59981 > > A.K. > > > > > > - Original Message - > From: Faz Jones > To: r-help@r-project.org > Cc: > S

Re: [R] deleting columns from a dataframe where NA is more than 15 percent of the column length

2012-08-06 Thread Faz Jones
Thank you. It works great. Sent from my iPhone On Aug 5, 2012, at 9:08 PM, Jorge I Velez wrote: > Hi Faz, > > Here is one way of doing it where "x" is your data frame: > > x[, colMeans(is.na(x)) <= .15] > > HTH, > Jorge.- > > > On Sun, Aug 5,

[R] deleting columns from a dataframe where NA is more than 15 percent of the column length

2012-08-05 Thread Faz Jones
I have a dataframe of 10 different columns (length of each column is the same). I want to eliminate any column that has 'NA' greater than 15% of the column length. Do i first need to make a function for calculating the percentage of NA for each column and then make another dataframe where i apply t

[R] Creating frequency table using conditions in a for-loop

2012-06-06 Thread Faz Jones
Hi, I have attached a word document to explain the problem i am having creating a for-loop in R with conditions to create a frequency table. I am new to R so any help would be greatly appreciated. Thanks Jones __ R-help@r-project.org mailing list https

Re: [R] anova of lme objects (model1, model2) gives different results depending on order of models

2012-05-31 Thread Albyn Jones
fects models. > Depends: graphics, stats, R (>= 2.13) > Imports: lattice > Suggests: Hmisc, MASS > LazyLoad: yes > LazyData: yes > License: GPL (>= 2) > BugReports: http://bugs.r-project.org > Packaged: 2012-05-23 07:28:59 UTC; ripley > Repository: CRAN > Da

Re: [R] problem with break command

2012-04-26 Thread cassie jones
Thanks Berend, you are right. The break command would not work here. But the while loop is taking time to generate the desired. On Thu, Apr 26, 2012 at 2:39 PM, Berend Hasselman wrote: > > On 26-04-2012, at 21:30, cassie jones wrote: > > > Hello R-users, > > > > I a

[R] problem with break command

2012-04-26 Thread cassie jones
Hello R-users, I am having a problem with the 'break' command in R. I am wondering if anyone can help me out with this. My program is similar to the following. a=rep(NA,5) a[1]=0 for(i in 2:5) { a[i]=a[i-1]+runif(1,0,3) if(a[i]>5) { i=2 break } } What exactly I am

Re: [R] Study design question; MLB; pay and performance.

2012-04-19 Thread Albyn Jones
istinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Albyn Jones Reed College jo...@reed.edu __ R-help@r-project.org mailing list

Re: [R] Creating a loop with an indefinite end term

2012-04-10 Thread Albyn Jones
y that I can construct this so that my > array is exactly as long as the number of spots I need to reach my threshold > value? > > Thanks, > > -Steve > > -Original Message- > From: Albyn Jones [mailto:jo...@reed.edu] > Sent: Tuesday, April 10, 2012 11:46 AM &g

Re: [R] Creating a loop with an indefinite end term

2012-04-10 Thread Albyn Jones
ad the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Albyn Jones Reed College jo...@reed.edu __ R-help@r-project.org mailing list https://stat.ethz.ch/mail

Re: [R] how to convert seconds to 12 hour time format

2012-04-09 Thread cassie jones
%M:%S %p") > > > On Mon, Apr 9, 2012 at 9:38 PM, cassie jones > wrote: > > > > Hello everyone, > > > > I am wondering if there is any routine in R which can convert time given > in > > 'seconds' unit to the 12 hour time format. For exampl

[R] how to convert seconds to 12 hour time format

2012-04-09 Thread cassie jones
Hello everyone, I am wondering if there is any routine in R which can convert time given in 'seconds' unit to the 12 hour time format. For example, suppose the data set looks like x=c(36885,84000,20) #x in seconds I want to get the output as [1] " 11:14:45 AM" [2] " 11:20:00 PM" [3] "12:20:00

[R] y needing more than 2 functions

2012-03-26 Thread Aimee Jones
Dear all, I'm aware if y has two separate functions (depending on the conditions of x) you can use the ifelse function to separate y into two separate functions depending on input. How do you do this if there a multiple different conditions for x? for example, y fits the following between t>0 &

Re: [R] Fitting & evaluating mixture of two Weibull distributions

2012-03-05 Thread jones
The contribution of each observation to the logliklihood is log(p*f1(x) + (1-p)*f2(x)) where f1 and f2 are the two density functions. Just sum. The standard likelihood ratio test is problematic here, as there are two parametrizations that reduce the mixture model to a single compone

[R] Trouble with strwrap function

2012-03-04 Thread Aimee Jones
gibberish in the graphical output. What can I do to make sure the subtitle posts in consecutive lines (without using /n )? thank you for your assistance, Aimee Jones par(mfrow=c(1,1)) plot(out_rk4$time, out_rk4$N2, col="blue", type="l", lwd=3, cex.lab=0.75, xlim=c(0,3650),

Re: [R] having a bit of regression trouble

2012-01-25 Thread jones
Since this is a homework exercise, I'm guessing that the intent of the problem is for you to figure out why that is happening. albyn On 1/25/12 2:24 PM, Rampagegrl wrote: I got the code for how to do regression without an intercept out of the back of my book and the next part of the homework a

Re: [R] Prediciting sports team scores

2012-01-17 Thread Albyn Jones
Robin Lock at St Lawrence has done this for hockey, see http://it.stlawu.edu/~chodr/faq.html As I recall, he has a poisson regression model with parameters for offense and defense, and perhaps home 'field' advantage. I confess I am skeptical that this is the right approach for football - te

[R] Adding a migration element to a deterministic spatial model

2012-01-08 Thread Aimee Jones
Hi all, I've been working with a friend's model that is a spatial model consisting of 4 patches. She uses the code found below to add migration between the patches for the three species of concern. When I run a script incorporating this code, all four patches run independently without migration occ

Re: [R] calculate quantiles of a custom function

2012-01-04 Thread Albyn Jones
FWIW, the integral of a mixture density is the same mixture of the CDFs, so you can use the pbeta functions: pcustom <- function(x) (pbeta(x,2,6) + pbeta(x,6,2))/2 albyn Quoting Gerhard : Am Dienstag, 3. Januar 2012, 19:51:36 schrieb Prof. Dr. Matthias Kohl: D <- AbscontDistribution(d = f

Re: [R] calculate quantiles of a custom function

2012-01-03 Thread Albyn Jones
right. replace dbetas with pbetas. albyn Quoting Duncan Murdoch : On 03/01/2012 1:33 PM, Albyn Jones wrote: What do quantiles mean here? If you have a mixture density, say myf<- function(x,p0) p0*dbeta(x,2,6) + (1-p0)*dbeta(x,6,2) then I know what quantiles mean. To find the

Re: [R] calculate quantiles of a custom function

2012-01-03 Thread Albyn Jones
What do quantiles mean here? If you have a mixture density, say myf <- function(x,p0) p0*dbeta(x,2,6) + (1-p0)*dbeta(x,6,2) then I know what quantiles mean. To find the Pth quantile use uniroot to solve for the x such that myf(x,p0) - P =0. albyn Quoting VictorDelgado : Gerhard wrot

Re: [R] Finding all triangles in a graph

2011-12-27 Thread Albyn Jones
Taral The general problem of finding subgraphs with a given structure ("motifs") is hard (ie computationally expensive). There is some literature... have you looked at the package igraph, function graph.motifs()? albyn Quoting Taral : I have the adjacency matrix of a graph. I'm trying to fi

[R] data vector to corresonding percentile ranks

2011-12-23 Thread Steve Jones
I have a problem where I need to calculate the corresponding cohort percentile ranks for each of several variables. Essentially, what I need is a function that will calculate the distribution-free percentiles from each variable's data vector, returning a corresponding vector of percentiles: e.g.

Re: [R] Statistical tests and measures for "cone-like" distributions?

2011-12-21 Thread Albyn Jones
istinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Albyn Jones Reed College jo...@reed.edu __ R-help@r-project.org mailing lis

Re: [R] map at fips level using multiple variables

2011-12-08 Thread Albyn Jones
and show them on the county FIPS level? > > > >"breakdown" suggests a factor construct. If so, then : > > > >?interaction > > > >But the "show" part of the question remains very vague. > > > > Can&#

[R] How does once import a function from an imported script?

2011-11-09 Thread Aimee Jones
and then enter B1 to see what the workspace returns, I get function(T1,t) (parms["B1"]) I am trying to get B1 to return as function(T1,t) {2*dnorm(T1(t),mean=32.5,sd=7)}, so that I can plot B1(T1,t). Is there any way to do this? Thank you for your assistance

Re: [R] Discrepancy with p.value from t.test

2011-11-01 Thread Albyn Jones
[[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 comment

[R] Display a contingency table on the X11 device

2011-10-05 Thread Parker Jones
Hello, I'd like to output a table to the x11 device, but I can't seem to find an easy way to do it. Specifically, I'd like to display a 2x2 contingency table alongside a graphical plot, but can only see how to output to the console. Is there a library that can do this? Thanks for any sugges

Re: [R] cumVar and cumSkew

2011-09-15 Thread Albyn Jones
gt; 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. > -- Albyn Jones Reed College jo...@reed.edu __

Re: [R] Density function: Area under density plot is not equal to 1. Why?

2011-09-08 Thread Albyn Jones
___ > 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. > -- Albyn Jones Reed College jo...@ree

Re: [R] spectral analysis

2011-08-23 Thread cassie jones
Is there anything in R similar to spectogram command in matlab? On Tue, Aug 23, 2011 at 10:20 AM, Petr PIKAL wrote: > Hi > > > > Hi all, > > > > I am trying to do spectral analysis of a time series data. But I am not > sure > > how to do it. Can anyone tell me if there are any package I can use

[R] spectral analysis

2011-08-23 Thread cassie jones
Hi all, I am trying to do spectral analysis of a time series data. But I am not sure how to do it. Can anyone tell me if there are any package I can use to do the analysis using fast fourier transform? Thanks in advance. Cassie [[alternative HTML version deleted]]

Re: [R] Calculating p-value for 1-tailed test in a linear model

2011-08-22 Thread Albyn Jones
in the expected direction, I think you > can just leave out the multiplication by 2 and get the right answer ... > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.

Re: [R] generate two sets of random numbers that are correlated

2011-08-11 Thread Albyn Jones
___ > 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

Re: [R] Plotting compound functions--help with defining x-axis as f(x)

2011-07-24 Thread Aimee Jones
sly. Thank you for any further help, Aimee 2011/7/24 Uwe Ligges > > > On 23.07.2011 00:50, Aimee Jones wrote: >> >> Hi all, >> I'm having trouble locating a script that will allow to me to create graphs >> that show compound functions as a function of the simpl

[R] Plotting compound functions--help with defining x-axis as f(x)

2011-07-23 Thread Aimee Jones
Hi all, I'm having trouble locating a script that will allow to me to create graphs that show compound functions as a function of the simple function, rather than just x (or time as it is in my case). Currently I have the following functions defined in my script: > > > T1<-function(t) {27.5-12.5*

[R] replacing duplicate rows

2011-07-21 Thread cassie jones
Hi all, I have a matrix which looks like the following, x=matrix(c(1,2,3,4,3,5,4,6,4,9),5,2,byrow=T) Now, I want to replace the 2nd columns of those 4 rows which have duplicate entries in the 1st column. For example, x[2,1]=x[3,1]=3 and I want to replace x[3,2] by x[2,2]. Similarly, I want to re

Re: [R] fixed effects Tobit, Honore style?

2011-07-15 Thread David Hugh-Jones
A cleaner and slightly more tested version is at http://davidhughjones.blogspot.com/2011/07/honore-style-fixed-effects-estimators.html David Hugh-Jones Research Associate CAGE, Department of Economics University of Warwick http://davidhughjones.googlepages.com On 13 July 2011 15:33, David

Re: [R] fixed effects Tobit, Honore style?

2011-07-13 Thread David Hugh-Jones
=x1, x2=x2, dataset=dataset, method="BFGS", control=list(maxit=1000)) if (res$convergence != 0) warning("Didn't converge") res$par } For standard errors, bootstrap. David Hugh-Jones Research Associate CAGE, Department of Economics University of Warwick ht

Re: [R] Help in error removal

2011-07-12 Thread David Hugh-Jones
On 12 July 2011 12:27, Mitra, Sumona wrote: > Dear all, > > I am new to programming in R. > You sure are ;-) I deal with microarray data,which is a data frame object type. I need to > carry out a few statistical procedures on this, one of them being the > pearson corelation. I need to do this

[R] fixed effects Tobit, Honore style?

2011-07-12 Thread David Hugh-Jones
Hi all, Is there any code to run fixed effects Tobit models in the style of Honore (1992) in R? (The original Honore article is here: http://www.jstor.org/sici?sici=0012-9682%28199205%2960%3A3%3C533%3ATLALSE%3E2.0.CO%3B2-2) Cheers David [[alternative HTML version deleted]] _

[R] Server question

2011-06-17 Thread Oliver Jones
Jones T: 01845 595911 M: 07977 122089 DIG*RED Web Production | <http://www.digred.com/> www.digred.com 2 Vyner's Yard Rainton North Yorkshire YO7 3PH [[alternative HTML version deleted]] __ R-help@r-project.org mailing

[R] issue with strptime

2011-06-17 Thread cassie jones
Hi everyone, I have bunch of date and time observations in the format %Y-%m-%d %I %M %S %p. I used strptime() to read this format. But the problem is some of the times are in the format of %I %M %p, so for those times, strptime is giving me NA values. For example, strptime(paste("2009-04-08","1

Re: [R] Trouble with compound functions---differential equations

2011-06-15 Thread Aimee Jones
Hey, Thank you for your swift responses, both options work great. Aimee On Wed, Jun 15, 2011 at 11:30 PM, Rolf Turner wrote: > On 16/06/11 11:07, Aimee Jones wrote: > >> Hi all, >> My apologies if this message is incredibly inept but I am very new to both >> compu

[R] Trouble with compound functions---differential equations

2011-06-15 Thread Aimee Jones
Hi all, My apologies if this message is incredibly inept but I am very new to both computer programming and to R. I am working with the odesolve add-on and have the following function defined RVF_Single <- function(t, x, p) within the script I also have the following functions defined: T1<-funct

Re: [R] "useR! 2011" T-shirt competition

2011-05-27 Thread Albyn Jones
gt; adding to my collection. > > __ > 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. &g

[R] table of Design regressions?

2011-05-26 Thread David Hugh-Jones
with that? xtable doesn't seem to do the trick. Cheers, David Hugh-Jones Research Associate CAGE, Department of Economics University of Warwick http://davidhughjones.googlepages.com [[alternative HTML version deleted]] __ R-help@r-project.o

Re: [R] Help with 2-D plot of k-mean clustering analysis

2011-05-18 Thread Albyn Jones
p@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. > -- Albyn Jones Reed College jo...@reed.edu ___

Re: [R] simulation from truncated poisson

2011-05-16 Thread cassie jones
--Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of cassie jones > Sent: Monday, May 16, 2011 5:28 PM > To: r-help@r-project.org > Subject: [R] simulation from truncated poisson > > Dear all, > > I need to simul

Re: [R] simulation from truncated poisson

2011-05-16 Thread cassie jones
uniform between that value and 1, then feed that > uniform into the qpois function. > > > > *From:* cassie jones [mailto:cassiejone...@gmail.com] > *Sent:* Monday, May 16, 2011 7:46 PM > *To:* Greg Snow > *Cc:* r-help@r-project.org > *Subject:* Re: [R] simulation from tr

[R] simulation from truncated poisson

2011-05-16 Thread cassie jones
Dear all, I need to simulate values from a Poisson distribution which is truncated at certain value 'a'. Can anyone tell me if there is in-built package in R which can simulate from a truncated Poisson? If not, what should be the steps to write a function which would do that? Thanks in advance.

Re: [R] Power Analysis

2011-04-18 Thread Albyn Jones
e test is a moot point! > > David Cross > d.cr...@tcu.edu > www.davidcross.us > > > > > On Apr 18, 2011, at 5:14 PM, Albyn Jones wrote: > > > First, note that you are doing two separate power calculations, > > one with n=2 and sd = 1.19, the other wit

Re: [R] Power Analysis

2011-04-18 Thread Albyn Jones
p > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Albyn Jones Reed College jo...@reed.edu __ R-help@r-project.org mailing list https://stat.ethz.

  1   2   3   4   5   >