similar to: sapply

Displaying 20 results from an estimated 7000 matches similar to: "sapply"

2009 Feb 13
4
PCA functions
Hi All, would appreciate an answer on this if you have a moment; Is there a function (before I try and write it !) that allows the input of a covariance or correlation matrix to calculate PCA, rather than the actual data as in princomp() Regards Glenn [[alternative HTML version deleted]]
2009 Jan 14
6
Removing duplicates from a list
For a list say; list1<-{1,2,3,4,5,2,1} How do I remove the duplicates please? My real list is 20,000 obs long of dates with many duplicates Regards Glenn [[alternative HTML version deleted]]
2009 Jan 19
3
Month tick marks on a plot()
Hi All, I have a small dataframe [dates, values) I am plotting with plot(df,type=²l²) And the date date covers a year. The graph only have marks at Œ2008¹ and Œ2009¹. How do I get the months labeled at the bottom please Thanks as always Glenn [[alternative HTML version deleted]]
2009 Feb 09
2
subsets problem
Help with this much appreciated I have a large dataframe that I would like to subset where the constraint Test1 <- subset(df, date == uniques[[1]]), where uniques is a list of dates that must be matched to create Test1. I would like to perform an operation on Test1 that results in a single column of data. So far so good. How do loop through all values in the uniques list (say
2009 Feb 06
2
does R plus 3.3 need vista ?
Hi all - has anyone ot and experienced problems with R+. Have downloaded the trail and it will not work -does it need vista (like it says on the box!) Thanks glenn [[alternative HTML version deleted]]
2009 Jan 18
1
Combinations
Hi All, some help on this would be appreciated; Understood combinations(7,4) returns all the possible 4 part combinations out of 7. Is is possible to substitute the ³7² for a list of stuff you would like to see the mix of; c(³a²,...,²g²) say ? Thanks Glenn [[alternative HTML version deleted]]
2009 Jan 14
2
List of Lists
Dear All; Is it possible to create a list of lists (I am sure it is) along these lines; I have a dataframe data02 that holds a lot of information, and the first column is ³date² I have a list of dates in; data03<-c(date1,.....,daten) And would like to create a list; data04 <- subset(data02, date == data03[1,]) Ie. data04 holds the data from data02 that matches a date in data03 How do
2009 Jan 10
1
<no subject>
Very simple questions if anyone can help: (1) what is the value in saving workspaces, which is offered at every close? I thought it might save the set up of the GUI but I cant work out what it does ­ I run a script that loads the packages I need at the start of every session. (2) mathematica has a term (%) that when typed means the last returned value, so > % + 1 say would return the last
2009 Feb 09
1
standardize
Very quick newbie question sorry; How do I standardize a list of data please (other than do the calculation of course). Is there a quick way please ? glenn [[alternative HTML version deleted]]
2011 Oct 27
2
Syntax Check: rshape2 melt()
This is my first excursion into using reshape2 and I want to ensure that the melt() function call is syntactically correct. The unmodifed data frame is organized this way: head(tds.anal) site sampdate param quant 1 UDS-O 2006-12-06 TDS 10800 4 STC-FS 1996-06-14 Cond 280 7 UDS-O 2007-10-04 Mg 1620 9 UDS-O 2007-10-04 SO4 7580 19 JCM-10B 2007-06-21 Ca 79 20
2009 Aug 20
1
Questions on factors in regression analysis
I got two questions on factors in regression: Q1. In a table, there a few categorical/factor variables, a few numerical variables and the response variable is numeric. Some factors are important but others not. How to determine which categorical variables are significant to the response variable? Q2. As we knew, lm can deal with categorical variables. I thought, when there is a categorical
2011 Aug 30
3
Descriptive Stats from Data Frame
I don't find how to do what I need to do in Dalgaard or 'R Cookbook', so I'm asking here. I have a data frame with water chemistry data and I want to start exploring these data. There are three factors (site, date, chemical) associated with each measurement. The data frame looks like this: > summary(chemdata) site_id.sample_date.param.quant
2011 Oct 24
2
Syntax Help for xyplot()
Thanks to David's help I subset my large data set and produced a smaller one for a single stream and 7 factors of interest. The structure of this data frame is: str(burns.tds.anal) 'data.frame': 718 obs. of 4 variables: $ site : Factor w/ 143 levels "BC-0.5","BC-1",..: 1 1 4 6 4 4 4 5 5 5 $ sampdate: Date, format: "1996-06-02"
2013 Feb 02
1
Mixed Models: Contribution of random variable to final estimate
Dear all, We want to test if the invasiveStatus is predicted by the amount (quant) of animals arriving to a country of a certain species (taxonid). We are using lmer to perform the model. The model is: lmer(invasiveStatus~I(log(quant+1))+I(log(inDegree+1))+(1|taxonid)+(1|country), family=binomial,data=td), where invasiveStatus is a binary variable, quant and inDegree are integer variables, and
2012 Jun 07
1
Quantile regression: Discrepencies Between optimizer and rq()
Hello Everyone, I'm currently learning about quantile regressions. I've been using an optimizer to compare with the rq() command for quantile regression. When I run the code, the results show that my coefficients are consistent with rq(), but the intercept term can vary by a lot. I don't think my optimizer code is wrong and suspects it has something to do with the starting
2010 May 16
1
problems with generation of quantiles under For ()
Dear, I want to make an application to calculate quantile within a For() I tried the following without success: ej. date p_val <- matrix(sample(10, 1000, replace=TRUE), 200,5) test 1 rr <- paste("p_val$",names(p_val[1]), sep="") quant <- quantile(rr, probs = c(0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100)/100, na.rm=FALSE, type=1) test 2 rr <-
2012 May 08
1
what folder to run write_PACKAGES in?
I set up a local repo for testing packages. My packages are not showing up from the repository when viewed by Linux clients. I suspect this is a web administrator/firewall issue, but it could be I created the repo wrongly. I am supposed to run write_PACKAGES separately in each R-version folder. Right? Maybe other novices can use these scripts, if they are not wrong :) Here's the file
2009 Apr 25
3
Nomogram with stratified cph in Design package
Hello, I am using Dr. Harrell's design package to make a nomogram. I was able to make a beautiful one without stratifying, however, I will need to stratify to meet PH assumptions. This is where I go wrong, but I'm not sure where. Non-Stratified Nomogram:
2007 Jan 09
1
some Maildir files not honoring dovecot-shared
I'm using RC15 on Solaris 9. The wiki indicates that when a dovecot-shared file exists, "Dovecot uses the same permissions and GID when it creates index files, dovecot-uidlist file, new mail files, etc." In my case, Dovecot *is* creating new index files based on dovecot-shared, but dovecot-uidlist and individual message files don't completely match the permissions/group
2005 Dec 20
3
Overlaying lattice plots
Hillary, Richard M wrote: > Morning chaps, I have a little question for your capable minds... Say > I have an observed and predicted set of quants (in my case, length > frequencies by year and age/length), is there a way to use lattice > plots to plot the observed and predicted data together, panel by panel? > Obrigado/gracias (thankyou in Galego is?...) > Rich Hi Richard, If