Re: [R] Assigning categorical values to dates

2021-07-22 Thread N. F. Parsons
11:11 AM Uwe Ligges < > lig...@statistik.tu-dortmund.de> wrote: > >> For a data.frame d, I'd simply do >> >> d$cycle <- factor(d$dates, labels=1:3) >> >> but I have not idea about tibbles. >> >> >> Best, >> Uwe Ligges >>

Re: [R] Assigning categorical values to dates

2021-07-22 Thread N. F. Parsons
) > > # base R > as.integer(factor(df1$dates)) > match(df1$dates, unique(sort(df1$dates))) > > # dplyr > df1 %>% group_by(dates) %>% mutate(cycle = cur_group_id()) > > > My favorite is by far the 1st but that's a matter of opinion. > > > Hope this

Re: [R] [EXT] Re: Assigning categorical values to dates

2021-07-21 Thread N. F. Parsons
ay my > respects to their Elders. > > > > > > On 22 Jul 2021, 1:47 PM +1000, N. F. Parsons , > wrote: > > External email: Please exercise caution > > > > I am not averse to a factor-based solution, but I would still have to > > manually enter that

Re: [R] Assigning categorical values to dates

2021-07-21 Thread N. F. Parsons
levels is that > you might have an awful lot of factors if you have a large enough > dataset. > > > > Quoting "N. F. Parsons" : > > > Hi all, > > > > If I have a tibble as follows: > > > > tibble(dates = c(rep("2021-07-04", 2),

[R] Assigning categorical values to dates

2021-07-21 Thread N. F. Parsons
Hi all, If I have a tibble as follows: tibble(dates = c(rep("2021-07-04", 2), rep("2021-07-25", 3), rep("2021-07-18", 4))) how in the world do I add a column that evaluates each of those dates and assigns it a categorical value such that datescycle 2021-07-04

Re: [R] Need help using lattice

2021-02-09 Thread Parkhurst, David F.
Thanks. What editor do you use? I'm working in a Mac, if that makes a difference. From: Gerrit Draisma Date: Tuesday, February 9, 2021 at 5:10 PM To: Parkhurst, David F. Cc: r-help@r-project.org Subject: Re: [R] Need help using lattice Ha David, I do not know. It must be that your Apr

Re: [R] Need help using lattice

2021-02-09 Thread Parkhurst, David F.
    labels=AprToDec, ordered=TRUE)) I get + signs in front of monames and labels, again as expected, but then it gives me another + sign. And if I try to add another ), it keeps giving me + signs. What is happening here? From: Gerrit Draisma Date: Tuesday, February 9, 2021 at 6:14 AM To: Park

Re: [R] Need help using lattice

2021-02-09 Thread Parkhurst, David F.
Thank you. From: Gerrit Draisma Date: Tuesday, February 9, 2021 at 6:14 AM To: Parkhurst, David F. Cc: r-help@r-project.org Subject: Re: [R] Need help using lattice Ha David, Thanks for your reply. For your last question, you have to change month into an ordered factor variable: library

[R] Need help using lattice

2021-02-07 Thread Parkhurst, David F.
I have a dataframe comprising a vector of E. coli concentrations, a vector of months when the samples were taken, and a vector of sampled sites. I�d like to produce a lattice with sites along the horizontal axis, and months on the vertical. Each site-month box would then contain concentrations

Re: [R] bi-directional bar chart with a central axis

2019-09-17 Thread Sabatier, Jennifer F. (CDC/DDPHSIS/CGH/DGHP) via R-help
Oh, that's a nice option, too. Thanks! -Original Message- From: Richard M. Heiberger Sent: Tuesday, September 17, 2019 6:54 PM To: Sabatier, Jennifer F. (CDC/DDPHSIS/CGH/DGHP) Cc: r-help@r-project.org Subject: Re: [R] bi-directional bar chart with a central axis I would us

Re: [R] bi-directional bar chart with a central axis

2019-09-17 Thread Sabatier, Jennifer F. (CDC/DDPHSIS/CGH/DGHP) via R-help
Thanks, Jim (author of plotrix!), that's a real easy way to do it! I'll play around with options. Jen -Original Message- From: Jim Lemon Sent: Tuesday, September 17, 2019 6:43 PM To: Sabatier, Jennifer F. (CDC/DDPHSIS/CGH/DGHP) ; r-help mailing list Subject: Re: [R] bi-d

Re: [R] bi-directional bar chart with a central axis

2019-09-17 Thread Sabatier, Jennifer F. (CDC/DDPHSIS/CGH/DGHP) via R-help
e plotrix link. Jen -Original Message- From: David Winsemius Sent: Tuesday, September 17, 2019 6:32 PM To: Sabatier, Jennifer F. (CDC/DDPHSIS/CGH/DGHP) ; r-help@r-project.org Subject: Re: [R] bi-directional bar chart with a central axis On 9/17/19 3:14 PM, Sabatier, Jennifer F. (CDC/DDPHSIS/

[R] bi-directional bar chart with a central axis

2019-09-17 Thread Sabatier, Jennifer F. (CDC/DDPHSIS/CGH/DGHP) via R-help
','B','C','D','E','F','G', 'H', 'I','J','K','L','M'), c("Males", "Females")) )) I want to make a graph tha

[R] How to set scale of color scatterplot points relative to a third variable?

2019-07-05 Thread Flaherty, Sarah (NIH/NCI) [F] via R-help
Hello Kind and Generous Volunteers, I'm trying to use a scatter plot to visualize three variables: time, radius, and intensity. I would like each point on the scatterplot to be colored according to a gradient, in which red indicates an intensity less than 1, white indicates an intensity of 1, a

[R] ROC within SEM

2018-06-06 Thread Palmer, Raymond F
Dear R group. Does anyone have an idea how to utilize a latent variable in an ROC (AUC) analysis? I want to create a latent variable, then use that latent construct as a continuous variable in an ROC. I understand both SEM and ROC analysis can be done in R, but how to use the latent variable in

[R] [R-pkgs] Announcing mfe 0.1.0

2017-08-30 Thread Luís Paulo F . Garcia
Dear R users, I am pleased to announce that the package mfe (Meta-Feature Extractor) is now available on CRAN (https://cran.r-project.org/package=mfe). The mfe package extracts meta-features from datasets to support the design of recommendation systems based on Meta-Learning. The meta-features, a

Re: [R] PROC MIXED RANDOM equivalence in R nlme

2017-08-11 Thread Dennis F. Kahlbaum
Hi David: Thanks for your response and suggestions. --Dennis On 8/11/17 2:03 PM, David Winsemius wrote: On Aug 11, 2017, at 7:56 AM, Dennis F. Kahlbaum wrote: Hi Robert: Thanks for your response, as well. I'm sorry. As you've discovered, I made some capitalization errors when po

Re: [R] PROC MIXED RANDOM equivalence in R nlme

2017-08-11 Thread Dennis F. Kahlbaum
nce I don't have SAS v6.12 anymore, I can't provide the so-called "correct results". As for the R hang, your wording is correct: "R gets caught in a processing loop that produces no errors or warnings", even after 15 minutes on an 8-core Mac Pro. As I recall, the SAS

Re: [R] PROC MIXED RANDOM equivalence in R nlme

2017-08-11 Thread Dennis F. Kahlbaum
Fisher > The plural of anecdote is not data. ~ Roger Brinner > The combination of some data and an aching desire for an answer does > not ensure that a reasonable answer can be extracted from a given body > of data. ~ John Tukey > > 2017-08-10 15:34 GMT+02:00 Dennis F. Kahlbaum &

[R] PROC MIXED RANDOM equivalence in R nlme

2017-08-10 Thread Dennis F. Kahlbaum
I am trying to reproduce some old SAS PROC MIXED code using R and nlme. The data consists of emission readings from vehicles and fuel properties. All variables are real numbers except "study" and "vehicle", which are character. Unfortunately, since the data are confidential, I'm unable to provi

[R] help with package ranks

2017-04-05 Thread davide f
Hello, I'm Davide. I'm using the package RANKS, in particular the functions do.GBA, do.RW, do.RANKS. To the funcs are given 2 different Matrix. One is a a simmetryc adjacency Matrix(called "M"), where rows and columns are protein, and the other is an annotation Matrix(called "ann"), where protein a

[R] [R-pkgs] Announcing mfe 0.1.0

2017-02-20 Thread Luís Paulo F . Garcia
Dear R users, I am pleased to announce that the package mfe (Meta-Feature Extractor) is now available on CRAN (https://cran.r-project.org/package=mfe). The mfe package extracts meta-features from datasets to support the design of recommendation systems based on Meta-Learning. The meta-features, a

[R] [R-pkgs] Announcing mfe 0.1.0

2017-02-09 Thread Luís Paulo F . Garcia
Dear R users, I am pleased to announce that the package mfe (Meta-Feature Extractor) is now available on CRAN (https://cran.r-project.org/package=mfe). The mfe package extracts meta-features from datasets to support the design of recommendation systems based on Meta-Learning. The meta-features, a

Re: [R] Hausman Test

2016-09-12 Thread Ding, Jie Ding (NIH/NIA/ERP) [F]
Dear Achim, Sorry to have disturbed you. I have encountered a problem when computing Hausman test statistics (i.e. p values) in R to compare OLS and 2SLS models. The problem is a discrepancy between the two p-value outputs from the "manual approach (by hand)" and the " diagnostics argument" i

Re: [R] RWeka and multicore package

2015-09-24 Thread Luís Paulo F . Garcia
A better solution provide by Adriano Rivolli: library(parallel) models <- mclapply(1:10, function(i) { model <- RWeka::J48(Species ~., iris[sample(nrow(iris))[1:100],]) rJava::.jcache(model$classifier) model }); 2013-10-24 10:16 GMT-02:00 Luís Paulo F. Garcia : > Dear

[R] Dunnett Test in 'multicomp' package

2015-06-04 Thread James F. Henson
to the first treatment in the order, which is "high dose". It is possible to rearrange the order so that "placebo' is first, but this is inconvenient. Thanks, James F. Henson [[alternative HTML version deleted]] __ R-hel

[R] download

2015-04-25 Thread s f jalaei
I am a student from Sweden. I would like to download and install R program to work on statistics. If I want to download 2014 version, how I can do this. Also, do I need to choose Sweden in Cran Mirrors list? Regards, Fatemeh [[alternative HTML version deleted]] _

Re: [R] multiple imputed files

2015-01-26 Thread N F
Hi, I think you want the {mitools} package. http://cran.r-project.org/web/packages/mitools/mitools.pdf. Anthony Damico's site, asdfree.com, has a lot of good code examples using various government datasets. Nate On Mon, Jan 26, 2015 at 5:23 AM, hnlki wrote: > Dear, > > My dataset consists out o

[R] Missing Data Imputation for Complex Survey Data

2014-12-12 Thread N F
Dear all, I've got a bit of a challenge on my hands. I've got survey data produced by a government agency for which I want to use the person-weights in my analyses. This is best accomplished by specifying weights in {survey} and then calculating descriptive statistics/models through functions in th

[R] Ass. 3 part 8 - output is correct but submission fails

2014-01-26 Thread F. Keshavarz
I verify my output with the csv file but I get an error in my submission. I am not sure I have the requirements understood. ex: rankall("Heart attack",4) gives me the following for AZ (this is a section of my output) FLAGSTAFF MEDICAL CENTERAZ SUMMIT HEALTHCARE REGIONAL MEDICAL CENTER

[R] What is tested in Ass.3 part 2

2014-01-26 Thread F. Keshavarz
I got an incorrect for my Ass.3 part 2 submission. What does this part 2 test. I want to correct the problem but do not know what the problem was. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mai

[R] Not sure if I have the requirement right.

2014-01-25 Thread F. Keshavarz
Hi I submited the rankhospital project. All parts were correct except part 2. I checked the outcome and it looks correct. I am afraid I am misunderstanding the requirement. Please let me know why the outcome is not correct. *THE OUTCOMEMy test* > source("rankhospital.R") > d<-rankhospital("WA","

[R] Discussion board

2014-01-19 Thread F. Keshavarz
rectory,summerize=FALSE) { xid<-toString(id) xid<-paste("000",xid,sep="") xid<-substr(xid, nchar(xid)-2,nchar(xid)) f<-sub(" ","",paste(xid,".csv",sep="")) f<-sub(" ","",paste(directory, &q

Re: [R] Converting decimal to binary in R

2013-12-16 Thread Earl F Glynn
11" > intToBin(65535) [1] "" > intToBin(65536) [1] "1" Earl F Glynn Principal Programmer/Analyst Center for Health Insights • University of Missouri – Kansas City __ R-help@r-project.o

Re: [R] How can I find nonstandard or control characters in a large file?

2013-12-10 Thread Earl F Glynn
r data and use sub/gsub or other tools to remove or alter problem characters. efg Earl F Glynn UMKC School of Medicine Center for Health Insights __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] RWeka and multicore package

2013-10-24 Thread Luís Paulo F . Garcia
e, Oct 22, 2013 at 7:11 AM, Patrick Connolly < p_conno...@slingshot.co.nz> wrote: > On Thu, 17-Oct-2013 at 02:21PM -0300, Luís Paulo F. Garcia wrote: > > |> I work very mutch with the packages RWeka and multicore. If you try to > run > |> J48 or any tree o

[R] RWeka and multicore package

2013-10-17 Thread Luís Paulo F . Garcia
I work very mutch with the packages RWeka and multicore. If you try to run J48 or any tree of RWeka with multicore we hava some errors. Example I: library(RWeka); library(multicore); mclapply(1:100, function(i) { J48(Species ~., iris); }); Output: "Error in .jcall(o, \"Ljava/lang/Class;\"

[R] empty html pages for R-exts and R-intro

2013-05-31 Thread James F. Reid
Dear all, I've found the html versions of 'An Introduction to R' [http://cran.r-project.org/doc/manuals/R-exts.html] 'Writing R Extensions' [http://cran.r-project.org/doc/manuals/R-intro.html ] to be empty. Not sure if this intentional, some transitional state of sort or if it is a genuine bug i

[R] n in pglm() and relogit()

2013-05-17 Thread f . leyendecker84
Dear all, How do I obtain the number of countries that my panel models estimated by pglm() and relogit() (the latter one is in the Zelig library) use? I couldn't find any information on that in the help files. Thank you very much in advance. Best wishes _

Re: [R] Sorting a data frame by specifying a vector

2012-10-11 Thread ROLL Josh F
tober 11, 2012 10:33 AM To: ROLL Josh F Cc: R help Subject: Re: [R] Sorting a data frame by specifying a vector Hi, In your dataset, it seems like it is already ordered in the way you wanted to. df.. <- data.frame(Season=rep(c("Summer","Fall","Winter","Spring&

[R] A problem of impulse response function about S-VAR

2012-09-13 Thread F. HP Chu
Dear All, I would like to use the package "vars" to get a impulse response function of a Structural VAR model. However, I got a wrong message and cannot deal with it. Here is my code: >library(vars) > >data <- read.table("data.txt", header=T) >y1<- data[,c("log_x1","log_x2","log_x3","log_x4"

Re: [R] add leading zeros

2012-07-27 Thread ROLL Josh F
This solution was the most elegant. Thanks everyone. Josh -Original Message- From: R. Michael Weylandt [mailto:michael.weyla...@gmail.com] Sent: Thursday, July 26, 2012 9:55 PM To: ROLL Josh F Cc: r-help@r-project.org Subject: Re: [R] add leading zeros Much easier than you think

Re: [R] aligning image with bar plot in the same plot

2012-07-17 Thread Luís F
;> >>> Thank you so much! >>> >>> Tiago >>> >>> # code >>> >>> ## matrix to plot >>> matI <- matrix(c(rep(1:3, 100), rep(4:6, 100), rep(7:9, 100)), nrow=3, >>> byrow=T) >>> >>> ##

Re: [R] Using object as literal value in list vector

2012-06-20 Thread ROLL Josh F
, 2012 1:14 PM To: ROLL Josh F Cc: R help Subject: Re: [R] Using object as literal value in list vector Hi, You can try: NewMeans<-split(matrix(unlist(MeanValues_)*0.80),1:nrow(matrix(unlist(MeanValues_)*0.80))) names(NewMeans)<-names(MeanValues_) NewMeans $ACC [1] 800 $RTL [1] 1600 $

Re: [R] Probably a good use for apply

2012-05-31 Thread ROLL Josh F
PM To: ROLL Josh F Cc: r-help@r-project.org Subject: Re: [R] Probably a good use for apply Hi, On Thu, May 31, 2012 at 1:08 PM, LCOG1 wrote: > This is great thank you.  I think I am getting the hang of some of the > apply functions.  I am stuck again however.  I have list test_ below &g

Re: [R] Identifying words ending with anything, say "ing"

2012-05-30 Thread Charlie F
#sample words words <- c("fixing","Dog","Carting","kite","running","playing") #find words ending in 'ing' result <- regexpr("^[a-zA-Z]+ing$",words) result [1] 1 -1 1 -1 1 1 attr(,"match.length") [1] 6 -1 7 -1 7 7 attr(,"useBytes") [1] TRUE # you can use result to take out the offending wo

[R] Predicting confidence intervals for fitted values for non-linear regression

2012-03-20 Thread Mills, Kathryn (NIH/NIMH) [F]
. Thank you for your help, Kate "I am interested to calculate confidence interval for fitted values in general for non-linear regressions. Lets say we have y=f(x1,x2,..xN) where f() is a non-linear regression. I would like to calculate a confidence interval for new prediction f(a1,..,aN).

Re: [R] Re : Moving average with loess

2012-03-09 Thread Faryabi, Robert (NIH/NCI) [F]
ith-lowess Which I cannot decipher it. Do you have any suggestion? On 3/9/12 1:42 AM, "Pascal Oettli" wrote: Hi Robert, You can try ?lowess Regards, Pascal - Mail original - De : "Faryabi, Robert (NIH/NCI) [F]" À : "r-help@r-project.org" Cc : Envoyé l

[R] Moving average with loess

2012-03-08 Thread Faryabi, Robert (NIH/NCI) [F]
Hello All, I just have a very simple question. I recently switching from Matlab to R, so cannot figure out some of the easy tasks in the new environment. Is there any weighted local regression smoothing in R? Basically, I want to have weighted moving average. All the functions that I know of ne

[R] Binning continuous data

2012-02-29 Thread Faryabi, Robert (NIH/NCI) [F]
Hi there, Here is the scenario: I have a measurement of some sort for two variables, I would like to figure out a rough pattern between them. Let say if the values of the first variable are low, middle, high, and extremely high, then what would be the corresponding pattern of the second variab

Re: [R] String position character replacement

2012-02-08 Thread Yang, Joy (NIH/NHGRI) [F]
Oh cool! I didn't realize you could assign a different value to a substring like that. Thanks! Joy From: Petr Savicky [savi...@cs.cas.cz] Sent: Wednesday, February 08, 2012 3:26 PM To: r-help@r-project.org Subject: Re: [R] String position character replace

Re: [R] String position character replacement

2012-02-08 Thread Yang, Joy (NIH/NHGRI) [F]
M To: Yang, Joy (NIH/NHGRI) [F] Cc: r-help@R-project.org Subject: Re: [R] String position character replacement And here's an alternative solution: subchar <- function(string, pos, char="-") { for(i in pos) { string <- gsub(paste("^(.{&q

[R] String position character replacement

2012-02-08 Thread Yang, Joy (NIH/NHGRI) [F]
Hi, Is there a way to efficiently replace specified indices in a string with another character? For example, if I had a vector of strings such as [1] "hellohowareyoudoing" [2] "imgoodhowareyou" [3] "goodandyou" [4] "yesimgoodijusttoldyou" [5] "ohyesthatsright" and had a list of positions that I

Re: [R] I bet apply has a solution

2012-02-06 Thread ROLL Josh F
Ah. That's the one. Thank you. -Original Message- From: Ista Zahn [mailto:istaz...@gmail.com] Sent: Monday, February 06, 2012 11:12 AM To: ROLL Josh F Cc: r-help@r-project.org Subject: Re: [R] I bet apply has a solution Hi Josh, How about apply(Data, 1, function(row) sd(row)

Re: [R] bayesian mixed logit

2012-01-18 Thread Carlo F
Thanks Ben, I am tryin on simulated data, say 300 repondents, 8 choice per person, only 2 random parameters... so i think it should be well behaved... so I am probably doing a mistake! :-) Thank for poiting out the MCMCglmm package, ultimately I need to write my own non-linear untility function,

Re: [R] To Try or to TryCatch, I have tried to long

2011-12-06 Thread ROLL Josh F
Dunlap [mailto:wdun...@tibco.com] Sent: Tuesday, December 06, 2011 11:42 AM To: gleyne...@gmail.com; ROLL Josh F Cc: r-help@r-project.org Subject: RE: [R] To Try or to TryCatch, I have tried to long Or, Google for 'R catching warnings' and third entry is the excellent http://www.st

[R] About summary in linear models

2011-12-06 Thread Otto F. Wagner
age of Dep Var. 276,0067 St Error Dep. Var 117,5827 Squared Sum of remainders 818,6362 Regression standar error 9,047852 R^2 0,995771 R^2 adj 0,994079 F(4, 10) 588,6040 p-value (de F) 8,09e-12 Log-likelihood -51,28100 Akaike 112,5620 Schwarz 116,1023

[R] ticks at the Y axis

2011-11-10 Thread Luís F
Dear Mailing list, I am trying to produce a simple xy plot but overlapping at the y-axis the y-values of each point. The problem is that I don't know the x-coordinate corresponding to the y-axis to plot the y-points. For each plot I have manually "calculated" the x-coordinate but was wondering wh

Re: [R] Aggregating data help

2011-10-20 Thread F Mai
check this out http://www.r-bloggers.com/pivot-tables-in-r/ -- View this message in context: http://r.789695.n4.nabble.com/Aggregating-data-help-tp3923138p3923397.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mai

[R] How to run Rcmdr with OS 10.4?

2011-10-11 Thread rocher . f
I've installed Rcmdr package and it doesn't run Here is the error message: R version 2.9.2 (2009-08-24) [R.app GUI 1.29 (5464) powerpc-apple-darwin8.11.1] [Workspace restored from /Users/jfc/Documents/TravauxFR/.RData] Le chargement a nécessité le package : tcltk Chargement de Tcl/Tk... termin

Re: [R] Oh apply functions, how you confuse me

2011-09-01 Thread ROLL Josh F
Dang Jim this looks to do the trick though I never heard of a data.table, interesting, I will explore more. Thanks you very much. -Original Message- From: jim holtman [mailto:jholt...@gmail.com] Sent: Thursday, September 01, 2011 11:20 AM To: ROLL Josh F Cc: r-help@r-project.org

[R] Can the environment of a function be specified when the function is defined?

2011-08-12 Thread Frederic F
Hello, Is there a syntax to set the environment of a function when this function is defined? The best I could come up with so far is using a wrapper function: foo_internals<- function(x) {"Code of the function"} foo<- function(x) { environment(foo_internals)<-as.environment(target_environme

Re: [R] How to quickly convert a data.frame into a structure of lists

2011-08-10 Thread Frederic F
Hello Denis, > To borrow shamelessly from one of the prominent helpers on this list: > "What is the problem you're trying to solve?"    (attribution: Jim Holtman) I'm trying to connect two sets of legacy R tools: the output of the first one can be transformed in a data.frame without loss of inf

Re: [R] How to quickly convert a data.frame into a structure of lists

2011-08-10 Thread Frederic F
Hello Duncan, Here is a small example to illustrate what I am trying to do. # Example data.frame df=data.frame(A=c("a","a","b","b"), B=c("X","X","Y","Z"), C=c(1,2,3,4)) # A B C # 1 a X 1 # 2 a X 2 # 3 b Y 3 # 4 b Z 4 ### First way of getting the list structure (ls1) using imbricated lapply

[R] How to quickly convert a data.frame into a structure of lists

2011-08-09 Thread Frederic F
Hello, This is my first project in R, so I'm trying to work 'the R way', but it still feels awkward sometimes. The problem that I'm facing right now is that I need to convert a data.frame into a structure of lists. The data.frame has columns in the order of tens (I need to focus on only three of

Re: [R] Summarize by two or more attributes

2011-05-17 Thread ROLL Josh F
I will take a look. In my real data I need to interpolate the 16 points into 64 points for each of the categories. Thanks Marc JR -Original Message- From: Marc Schwartz [mailto:marc_schwa...@me.com] Sent: Tuesday, May 17, 2011 1:09 PM To: ROLL Josh F Cc: r-help@r-project.org

Re: [R] Summarize by two or more attributes

2011-05-17 Thread ROLL Josh F
Marc, How could I also apply the spline function to each of the 'columns' found in the result from tapply(Df$Rate,list(Df$Bin,Df$Type),sum) ?? -Original Message- From: Marc Schwartz [mailto:marc_schwa...@me.com] Sent: Tuesday, May 17, 2011 12:42 PM To: ROLL Josh F

Re: [R] Compare three or more values?

2011-03-23 Thread Beale, Holly (NIH/NHGRI) [F]
1 if dealing with floating point numbers. > >--Erik > > >Beale, Holly (NIH/NHGRI) [F] wrote: >> Is there a less cryptic way to compare three or more values? >> >> allTheSame<-c("red","red","red","red") >> notAllTheSam

[R] Compare three or more values?

2011-03-23 Thread Beale, Holly (NIH/NHGRI) [F]
Is there a less cryptic way to compare three or more values? allTheSame<-c("red","red","red","red") notAllTheSame<-c(132,132,132,999) all.identical <- function(vectorToTest){ cIdentical=sum(vectorToTest %in% vectorToTest[1]) return(cIdentical==length(vectorToTest)) } all.identical(al

Re: [R] Loading mdb

2011-03-22 Thread ROLL Josh F
n a 64 bit machine. I cant seem to locate a 64 bit counterpart. -Original Message- From: Phil Spector [mailto:spec...@stat.berkeley.edu] Sent: Tuesday, March 22, 2011 1:01 PM To: ROLL Josh F Cc: r-help@r-project.org Subject: Re: [R] Loading mdb I believe that you are misinterpreting

Re: [R] Loading mdb

2011-03-22 Thread ROLL Josh F
only tool to read in mdb's from MS Access? I feel like it should be easier than this? Thoughts? Thanks Phil JR -Original Message- From: Phil Spector [mailto:spec...@stat.berkeley.edu] Sent: Tuesday, March 22, 2011 1:01 PM To: ROLL Josh F Cc: r-help@r-project.org Subject: R

[R] Pre-allocation of matrices is LESS efficient?

2011-02-17 Thread Alex F. Bokov
Motivation: during each iteration, my code needs to collect tabular data (and use it only during that iteration), but the rows of data may vary. I thought I would speed it up by preinitializing the matrix that collects the data with zeros to what I know to be the maximum number of rows. I was su

Re: [R] Four parameter logistics.

2011-02-08 Thread Victor F Seabra
try the code below, if you use different upper and lower limits you might get different parameter estimates HTH, Victor standard.curve<-data.frame(conc=c(50, 25, 12.5, 6.25, 3.125, 1.563, 0.781,50, 25, 12.5, 6.25, 3.125, 1.563, 0.781),absorb=c(1.918, 1.251, 1.104, 0.719, 0.403, 0.177, 0.083,1.9

Re: [R] Fortran and long integers

2011-02-06 Thread Earl F Glynn
4 is legal with your Fortran compiler: http://gcc.gnu.org/onlinedocs/gfortran/Old_002dstyle-kind-specifications.html#Old_002dstyle-kind-specifications efg Earl F Glynn Overland Park, KS __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listi

Re: [R] manipulate dataframe

2011-02-06 Thread Victor F Seabra
int to change a data.frame. > I want to split a column in more columns depending on the value of a other > column. > Thanks for the reaction, > Andre > > Example: >> dat > x1 x2 > 1 1 a > 2 1 b > 3 1 c > 4 2 d > 5

[R] Reading file names containing Metacharacters

2011-01-31 Thread Jeisson F
I am trying to read some file names from an specific directory and such names contains metacharacters. The file names is like V4.35_T01-400720.csv In total I have 14 files for which the value T01 goes up to T14. I need to read the files into a string vector that looks like >names"V4.35_T01-4007

Re: [R] Please, need help with a plot

2011-01-03 Thread Victor F Seabra
although the code somehow didn't work on my Vista / R 2.8, it did work perfectly on a XP machine / R 2.10 I've been trying to fix this for days, Thank you very much for your help! __ 02/01/2011 19:30, David Winsemius < dwinsem

Re: [R] using "plot" with time series object - "axes = FALSE" option does not appear to work

2011-01-03 Thread Victor F Seabra
I guess you should specify x and y variables: plot(x=PCECTPI$var1, y=PCECTPI$var2, axes = FALSE) __ 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-gui

[R] Please, need help with a plot

2011-01-02 Thread Victor F Seabra
Please, I wonder if someone knows how to add the less than or equal to symbol in the plot generated by the code below: var1<-c('age <= 3','age <= 7','age <= 10','age <= 11','age <= 20','age <= 25','age <= 30','age <= 45','age <= 50','age < 55','age >= 55') var2<-c(3.8,5.4,3.7,3.8,5.

Re: [R] problem with read.table

2011-01-01 Thread Victor F Seabra
_ Em 01/01/2011 20:05, Victor F Seabra < vsea...@uol.com.br > escreveu: Dear all, Please, when I use the command: table1<-read.table("table1.txt", header=TRUE, sep="\t") cells that contain \ u 2264 (corresponding to <= si

[R] problem with postscript command

2011-01-01 Thread Victor F Seabra
please, when i use the command postscript, the symbol "<="(less than or equal to) is replaced by "..." (ellipsis) how can I fix that? postscript("plot1.ps", width = 22, height = 11.5,pointsize=24,paper="special",bg="transparent") plot(NULL,xlim=c(1,10),ylim=c(1,10)) text(5,5,"

[R] problem with read.table

2011-01-01 Thread Victor F Seabra
Dear all, Please, when I use the command: table1<-read.table("table1.txt", header=TRUE, sep="\t") cells that contain \ u 2264 (corresponding to <= sign) get imported as \ \ u2264. which causes the need to manually edit each cell using the fix command. Is there a way to fix tha

Re: [R] Plot symbols: How to plot (and save) a graphic with symbols originating from a table

2011-01-01 Thread Victor F Seabra
Please, you need to read.table to R as my problems start there If you want you can download the txt file at the link below https://docs.google.com/leaf?id=0BweZgDxYn9BkNmY1NThmMDEtOWUxZS00MzE0LTk0NTQ tYzdlODMxODgxYzJh&hl=en thanks, Victor

Re: [R] Plot symbols: How to plot (and save) a graphic with symbols originating from a table

2011-01-01 Thread Victor F Seabra
lish what end? You have not described what you are trying to actually do. Is this text supposed to be plotted inside the plotting area or are you going to be using it as axis labels? There is a variety of approaches (especially the plotmath expression option) that can be used depending on the ultim

[R] Plot symbols: How to plot (and save) a graphic with symbols originating from a table

2011-01-01 Thread Victor F Seabra
Dear all, Please, I have a doubt regarding symbols plotting when the data originates from a table (i.e. is not manually fed into the "text" function) Please, see below: I have a tab delimited file called table1.txt with 4 columns. (I wasn't sure on how to attach the table to t

Re: [R] Plot symbols: How to plot (and save) a graphic symbols originating from a table

2011-01-01 Thread Victor F Seabra
"bill >= tony" "bill \u2265 tony" "9" "fish" "dude <= bro" "dude \u2264 bro" By the way, I'm running R on windows and didn't try any of this on Linux. thanks in advance, Victor   Victor Faria Sea

[R] Plot symbols: How to plot (and save) a graphic symbols originating from a table

2011-01-01 Thread Victor F Seabra
Dear all, Please, I have a doubt regarding symbol plotting with data originating from a table. Please, see below: I have a tab delimited file called table1.txt with 4 columns: yposanimal var1var2 5 cat gina <= lady gina \u2264 lady 7 dog bill >= tonybill \u

[R] Help on implementing a function

2010-12-24 Thread F
I have a vector which is an interval on which I'm trying to calculate the values of the following function for a probability distribution: http://r.789695.n4.nabble.com/file/n3163464/Equation.jpg I want to generate a k-size sample of values following the distribution above. For some reason, I'

Re: [R] Colours for 3-way probabilities

2010-12-18 Thread Earl F Glynn
http://www.efg2.com/Lab/Graphics/Colors/HSV.htm. For info on R's hsv function: ?hsv This page shows the "hue" map of an RGB image: http://www.efg2.com/Lab/Graphics/Colors/ShowImage.htm See the Color Chart page above for a brief example of using R's rgb2hsv functi

Re: [R] Replacing a period in a string

2010-12-02 Thread Earl F Glynn
What about this? Remove the periods and change the "," to a ".": s <- "12.084.547,17" x <- as.numeric(gsub(',','\\.', gsub('\\.','',s))) options(digits=10) x Escaping periods is not-so-obvious. efg Earl F Glynn O

Re: [R] List elements of NULL to value

2010-11-29 Thread ROLL Josh F
: Monday, November 29, 2010 12:58 PM To: ROLL Josh F Cc: r-help@r-project.org Subject: Re: [R] List elements of NULL to value Does A = lapply(A,function(x)if is.null(x) 0 else x) or for(i in 1:length(A))if(is.null(A[[i]]))A[i] = 0 do what you want

[R] summary.lm as a post-hoc test?

2010-10-30 Thread Alex F. Bokov
Let's assume that according to Anova(lm(y~a*b, data=d)) the a:b interaction is significant, and I would like to know if there are specific combinations of a and b levels that differ from the control group. Are there any caveats against simply looking at the p-values in the output generated by s

[R] Help troubleshooting silent failure reading huge file with read.delim

2010-10-06 Thread Earl F. Glynn
s there some memory-related parameter that I should adjust that might explain the observed details above? Shouldn't read.delim catch this failure instead of being silent about dropping data? Thanks for any help with this. Earl F Glynn Overland Park, KS ___

Re: [R] proportion

2010-09-13 Thread ROLL Josh F
Sure I tried that and it works but I was formerly using just 'proportion ' so I find it strange that this has occurred. -Original Message- From: Phil Spector [mailto:spec...@stat.berkeley.edu] Sent: Monday, September 13, 2010 4:08 PM To: ROLL Josh F Cc: r-help@r-project.org S

[R] scatterplot function - double check: dashed lines

2010-06-08 Thread K F Pearce
Hello everyone, This is just a quick double check. It concerns the 'scatterplot function' in R. I have 6 curves and I wish to represent each of them by a different kind of line (their colour must be black). The curves are derived from the cuminc function...the coordinates of which are in '

[R] Svy function doesn't work nested in user-defined function

2010-05-20 Thread Sabatier, Jennifer F. (CDC/OID/NCHHSTP)
Hi R-help, I posted about this late yesterday but got no response. I may have put TMI in the original request. Not to mention I couldn't cut and paste yesterday because I was working R off a non-network computer while asking for help on a network computer. Essentially, I have this user-define

[R] Using svychisq inside user-defined function

2010-05-19 Thread Sabatier, Jennifer F. (CDC/OID/NCHHSTP)
chisq <- svychisq(~svyX + SEX, design=audit, statistic="adjWald", round=4) chisq <- data.frame(do.call("cbind", chisq) chisq <- data.frame(chisq[,3]) Table <- data.frame(tbl$var, paste(formatC(tbl$X0.1*100, format="f", digits=1), "%",

Re: [R] Blanking out specific cells in a data frame

2010-05-19 Thread Sabatier, Jennifer F. (CDC/OID/NCHHSTP)
into NAs I can use NAToUnkown() to blank them out completely. Thanks, again, for getting back to me! Jen -Original Message- From: Ista Zahn [mailto:istaz...@gmail.com] Sent: Wednesday, May 19, 2010 1:59 PM To: r-help@r-project.org Cc: Sabatier, Jennifer F. (CDC/OID/NCHHSTP) Subje

Re: [R] Blanking out specific cells in a data frame

2010-05-19 Thread Sabatier, Jennifer F. (CDC/OID/NCHHSTP)
SWEET! That's EXACTLY what I need. Thanks! I can now just use NAToUnknown to turn the NA into blanks. Thanks a lot! Jen -Original Message- From: Stefan Grosse [mailto:singularit...@gmx.net] Sent: Wednesday, May 19, 2010 1:53 PM To: r-help@r-project.org; Sabatier, Jennifer F.

[R] Blanking out specific cells in a data frame

2010-05-19 Thread Sabatier, Jennifer F. (CDC/OID/NCHHSTP)
Hi R-Help, I am a new R user. I have used SAS for many years (just FYI on what I am used to and possible obstacles it presents). I have a data frame: mydf <-data.frame(matrix(rnorm(102), ncol=6) I would like to be able to delete ALL the information in column 6 for rows 2 through r, where r=#ro

  1   2   >