search for: jholtman

Displaying 20 results from an estimated 245 matches for "jholtman".

Did you mean: holtman
2009 Nov 25
3
Feature request for as.Date() function
Hello - I have a csv file with a few date columns. Some of the records have an "NA" character string instead of the date. When I attempt to use read.csv() and typecast the columns using colClasses, I receive the following error: Error in charToDate(x) : character string is not in a standard unambiguous format Similarly, the following command produces the same error:
2010 Jun 26
2
Recoding dates to session id in a longitudinal dataset
Hi, I'm fairly new to R but I have a large dataset (300000 obs) containing patient material. Some patients came 2-9 times during the three year observation period. The patients are identified by a unique idnr, the sessions can be distinguished using the session date. How can I recode the date of the session to a session id (1-9). This would be necessary to obtain information and do some
2016 Apr 24
1
assign color to subsets
...1,names with t2 and names with both. But now even > the grepl I use for the subsets does not work correct! :((( > > hast1=grepl("t1", df$Command, fixed=TRUE) > hast2=grepl("t2", df$Command, fixed=TRUE) > > > On Sunday, April 24, 2016 9:16 AM, jim holtman <jholtman at gmail.com> wrote: > > > > You never did provide a reproducible example or say how you wanted to > plot. Here is a way to get a subset of t1 or t2, and you can then use it > as input to ggplot: > > library(dplyr) > your_subset <- df %>% > mutate(k...
2016 Apr 24
0
assign color to subsets
...ommand)) I use factor to apply the subset to df but then the Command level becomes 0 df_both$Command=factor(df_both$Command) str(df_both) $ Protocol : Factor w/ 0 levels: Do you know what is the reason? Thanks for replying On Sunday, April 24, 2016 12:18 PM, jim holtman <jholtman at gmail.com> wrote: 'grepl' returns a logical vector; you have to use this to get your subset. You can use: df_tq <- subset(df, grepl("t1", Command)) df_t2 <- subset(df, grepl("t2", Command)) # if you want to also get a subset that has both, use df_both...
2008 May 15
2
Adding columns to dataframe
Hi, I have a dataframe SDF1 that looks like this: Char1 Char2 Char 3 W.2007.02 W.2007.09 W.2007.16 W.2008.13 A C1 F1 F2 F3 A C2 F4 B C3 F5 F6 I have another dataframe SDF2 with 163 cols that has the following column names Char1 Char2 Char 3 W.2007.02 W.2007.03 W.2007.04
2013 Sep 15
1
Data labels in R
I need to put labels in plot in R. Can someone please help? The labels are in the excel file and loaded into "lables" library(xlsx) library(zoo) fPTAnalysis<-"Input.xls" data<-read.xlsx(fPTAnalysis,9) lables<-subset(data, select=c(Labels)) data<-subset(data, select=c(Date,col1, col2 )) data<-read.zoo(data) plot(data) -- Regards, Ankur Seth [[alternative
2005 Dec 13
5
getting faster results
Hey, Can anyone answer this question. I am working with really large datasets and most of the programs I have been running take quite some time. I heard that R may be faster in Unix. I sthis true and if so can anyone reccomend which system and requirements may allow things to go faster for? Thanks!! Elizabeth Lawson --------------------------------- [[alternative
2010 May 24
5
Means do not tally
Hi all, here is my situation In my experiment, I expose 10 subjects to 24 different conditions of stimuli. Each condition is exposed to the same subject 3x. This would make each subject have 24x3=72 data points. All the subjects combined would have 72x10=720 data points with each condition having 30 datapoints. To find the grand average of each condition, I find the average of all the
2007 Apr 20
0
Fwd: Re: Character coerced to factor and I cannot get it back
--- John Kane <jrkrideau at yahoo.ca> wrote: > Date: Fri, 20 Apr 2007 10:47:45 -0400 (EDT) > From: John Kane <jrkrideau at yahoo.ca> > Subject: Re: [R] Character coerced to factor and I > cannot get it back > To: jim holtman <jholtman at gmail.com> > > Thanks Jim, > > I can live with it as a factor or I will do as you > suggest. What is bothering me is that I cannot seem > to reliably convert it to a character and have it > stay one when I incorporate it into a data.frame. > > Now that I know...
2009 Mar 17
1
the quote problem with readLines()
Dear all, I read a file with all numbers with readLines function, as below, > f <- file("data.txt") > a <- readLines(f) but all the values in a are in format "....", and I cannot do the calculation with them since they are not numeric. I wonder how should I skip those quotes, thank you for help! I have to use readLines function instead of scan, read.table or
2008 Sep 07
0
Fwd: request: most repeated sequnce
---------- Forwarded message ---------- From: jim holtman <jholtman at gmail.com> Date: Sun, Sep 7, 2008 at 11:42 AM Subject: Re: [R] request: most repeated sequnce To: Muhammad Azam <mazam72 at yahoo.com> This should do it for you: > x=c(1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,2,3,3,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,3,3,3,4,4,4,0,0,0,0,0,0,0,1,1,1...
2010 Feb 20
3
aggregating using 'with' function
Hi All, I am interested in aggregating a data frame based on 2 categories--mean effect size (r) for each 'id's' 'mod1'. The 'with' function works well when aggregating on one category (e.g., based on 'id' below) but doesnt work if I try 2 categories. How can this be accomplished? # sample data id<-c(1,1,1,rep(4:12)) n<-c(10,20,13,22,28,12,12,36,19,12,
2013 Mar 03
4
Help searching a matrix for only certain records
Let me start by saying I am rather new to R and generally consider myself to be a novice programmer...so don't assume I know what I'm doing :) I have a large matrix, approximately 300,000 x 14. It's essentially a 20-year dataset of 15-minute data. However, I only need the rows where the column I've named REC.TYPE contains the string "SAO " or "FL-15". My
2010 Aug 06
3
memory use without running gc()
Is there any way to get the current memory used by R without running gc()? I'd like to include the memory usage in logging output, but calling gc() to get that information takes long enough to be noticeable (~ 6 s with ~ 20 GB of ram in use), which goes against the point of logging. Thanks, Johann
2009 Jul 18
7
(-8)^(1/3) == NaN?
Why does the expression "(-8)^(1/3)" return NaN, instead of -2? This is not answered by http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-are-powers-of-negative-numbers-wrong_003f Thanks, Dave [[alternative HTML version deleted]]
2008 Aug 12
2
Multiple column/row names?
Hi all, I wonder if there is a way to create a matrix with two (or even more) column/row names? Thank you very much. Have a nice day. -- ??? Hesen Peng http://hesen.peng.googlepages.com/
2007 Feb 01
3
Can this loop be delooped?
Hi. I have the following code in a loop. It splits a vector into subvectors of equal size. But if the size of the original vector is not an exact multiple of the desired subvector size, then the first few subvectors have one more element than the last few. I know that the cut function could be used to determine where to break up the vector, but it doesn't seem to provide control over
2011 Mar 23
4
Modifying a particular column in a tab-delimited file
Hello R users, Good day!! I was wondering if there is a way in R to read in a particular column from a tab-delimited file, edit it and write it back into the file with all other columns intact. When I say edit I mean just replacing all the values in that column. I know to read a particular column from a file using colClasses option in read.delim() function. Is there any such option to write out
2008 Jul 17
0
Re : Re : float and double precision with C code
ok, sorry, my mistake was the C printf. Thank you for your good answer Regards ----- Message d'origine ---- De : JS Ubei <jsubei at yahoo.fr> ? : jim holtman <jholtman at gmail.com> Cc : r-help at r-project.org Envoy? le : Jeudi, 17 Juillet 2008, 15h25mn 07s Objet : [R] Re : float and double precision with C code thank you for your quick answer, I'm far of the digits capacity and my values are not the result of a computation. I'm developping a R pac...
2010 Feb 03
3
diagnostic plots
Dear all, does anybody ever encountered the problem with diagnostic plots? x<-rnorm(100) y<-rnorm(100) plot(lm(x~y)) It gives the following message "Waiting to confirm page change..." and nothing happens. Thanks a lot! [[alternative HTML version deleted]]