similar to: (no subject)

Displaying 20 results from an estimated 10000 matches similar to: "(no subject)"

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 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 18
1
Multiplication of dataframes
If I have 2 data frames; df1: dim(df1) = (1,10) df2: dim(df2) = (2000,10) Both with column header names, how do I multiply them together please. I.e create a dateframe dim() = (2000,1) Many Thanks in advance Glenn [[alternative HTML version deleted]]
2009 Feb 17
3
Combination
Hello, I have a sequence of numbers: seq(1:50) and I would like to have all the possible combinations with this numbers without repeating any combination: 11, 12, 13, ... ,22,23,24,... How can I do it? Best, Dani -- Daniel Valverde Saub? Grup de Biologia Molecular de Llevats Facultat de Veterin?ria de la Universitat Aut?noma de Barcelona Edifici V, Campus UAB 08193 Cerdanyola del Vall?s-
2009 Aug 12
3
Combinatorial problem
I have been struggling trying to write some code to produce all combinations subject to some restrictions. I thought someone might have some bright ideas. I have 11 values which fall into 5 groups. I want all combinations of 2,3, and 4 values where each value must be from a different group. The numbers in the groups are different. Here is a definition of the groups: groups <- list(gp1 =
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 Jun 08
3
Combining elements of vectors
Dear list, I have a vector of elements which I want to combined each with each, but none with itself. For example, > v <- c("a", "b", "c") and I need a function 'combine' such that > combine(v) [[1]] [1] "a" "b" [[2]] [1] "a" "b" [[3]] [1] "b" "c" I am not very interested in the orders
2010 Jul 20
1
apply: return list of matrices
Hi everybody, Suppose we have the following data structure: ddf <-data.frame(a=rep(1:4,3), b=rep(paste("p", 1:3, sep=""), each=4), c=c(1,0,0,1,1,1,0,1,1,1,1,1)) I want now to make a contingency table for each pair of values of p, i.e. a contingency table for each of the pairs (p1,p2), (p1,p3) and (p2,p3). The result should be given as a list of matrices: # [[1]]
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]]
2010 Feb 23
1
function on all pairs of vector entries
Hello all, Is there a way in R to compute the multivariate normal density of every pair of entries in a vector efficiently instead of using for loop? For example Suppose I have a vector a=c(v_1,...,v_p)=c(0.5343909, -0.7784353, -0.0568370, 1.8772838, -1.3183407, 0.8227418,...) I want to compute density(v_i, v_j) for every pair of entries (i,j) (i!=j) in a. The joint bivariate distribution
2011 Sep 12
2
Automated generation of combinations
Hello,   I'd like to generate automatically all the possible combinations of a set of 8 variables (there are 535, too many to do it by hand). For example:   input: varA, varB, varC output: varA+varB+varC             varA+varB             varA+varC             varB+varC             varA             varB             varC Is there any function that produces this option?   Thank you [[alternative
2010 Mar 18
3
Using indexing to manipulate data
I know one of R's advantages is it's ability to index, eliminating the need for control loops to select relevant data, so I thought this problem would be easy. I can't crack it. I have looked through past postings, but nothing seems to match this problem I have a data set with one column of actors and one column of acts. I need a list that will give me a pair of actors in each row,
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]]
2010 Feb 15
2
creating functions question
Hi All, I am interested in creating a function that will take x number of lm objects and automate the comparison of each model (using anova). Here is a simple example (the actual function will involve more than what Im presenting but is irrelevant for the example): # sample data: id<-rep(1:20) n<-c(10,20,13,22,28,12,12,36,19,12,36,75,33,121,37,14,40,16,14,20)
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 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
2010 Aug 18
2
combinations
I would appreciate any suggestions on which function to use to write subsequent functions analysing combinations of treatments. This refers to experimental trials of medical treatments. I want to write routines to analyse various comparisons (combinations) So .... if 5 treatments are available (t01, t02, t03, t04 and t05) I want to write a general routine that works out all possible
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
sapply
Newbie question sorry (have tried the help pages I promise) I have a dataframe (date,stockprice) say and looking how I might get the return of: dataframe (difference in days, change in stock price) using sapply - I require a very simple function and don't really want to go down the zoo and quant mod route Regards glenn [[alternative HTML version deleted]]
2010 Nov 09
3
Row-wise recurive function call
Dear Group, I have a following dataset: > a A B C D 1 22 3 31 40 2 26 31 36 32 3 3 7 49 16 4 24 40 27 26 5 20 45 47 0 6 34 43 11 18 7 48 48 24 2 8 3 16 39 48 9 20 49 7 21 10 17 36 47 10 > dput(a) structure(list(A = c(22L, 26L, 3L, 24L, 20L, 34L, 48L, 3L, 20L, 17L), B = c(3L, 31L, 7L, 40L, 45L, 43L, 48L, 16L, 49L, 36L), C = c(31L, 36L, 49L, 27L, 47L, 11L, 24L,