search for: dimitris_rizopoulos

Displaying 16 results from an estimated 16 matches for "dimitris_rizopoulos".

2008 Jul 22
2
Table orderd by frequencies
Dear List, I try to order the output of a table by the frequencies of the vector I am look at. The object I am looking at is a factor with a lot of levels that were named only once. Therefore it would be much easier to order the output by the frequencies of the levels. E.g. > levels(a) "a" "b" "c" "d" Preferred outcome: table(a) b c a d 10 5 1 1
2008 Jul 24
3
incrementing for loop by 2
Dear List-serv members: How can I structure a for loop so that it will increment the counter by two using R? I am just looking for a simple example that shows where the incrementing part should go. Thanks! Jennifer -- Jennifer Hayes Clark Assistant Professor Department of Political Science University of Houston Houston, TX 77204-3011 [[alternative HTML version deleted]]
2008 Jul 18
2
generate repeats of a vector's elements
Dear all, I have got a question for generating repeats of a vector's elements. Please don't hesitate to email me back and say that it is very easy although I can't find a method to solve it. If I have a n-vector b, whose elements are b[1], b[2], ..., b[n], how can I generate such a vector b[1], b[1], b[2], b[1], b[2], b[3], b[1], b[2], b[3], b[4], ......, b[1], b[2], ...,
2008 Jul 21
3
vector help
hi I have vector test. It has 3 elements. I want to join the three into one vector. "Geneset=HSA04910_INSULIN_SIGNALING_PATHWAY-157- 20". how can i do it. > class(test) [1] "character" > test [1] "Geneset=HSA04910_INSULIN_SIGNALING_PATHWAY" "157" [3] "20" Ramya --
2008 Jul 25
3
Help with rep
Hi Is it possible to use the rep command (or maybe some other "shortcut") to create a vector with the following format: 4 3 4 2 3 4 1 2 3 4 Any help is much appreciated. Thanks Jacob Jacob L van Wyk Department of Statistics University of Johannesburg, APK Box 524 Auckland Park 2006 South Africa Office Tel: +27 11 559 3080 Fax: +27 11 559 2832 [[alternative HTML version
2008 Aug 20
4
Conversion - lowercase to Uppercase letters
I would like to know how to convert a string with characters to all uppercase or all lowercase? If anyone could let me know if there exists a function in R for the conversion, that will be very helpful. Regards, Suman [[alternative HTML version deleted]]
2008 Jul 28
3
Fill in NA values in vector with previous character/factor
I have a vector of data (species names) interspersed with NA values and I want a function to "fill in the blanks", replacing NA values with whatever the last species name was. For example the vector: "A","B",NA,NA,"C",NA,NA,NA,NA,"D",NA,NA. should evaluate to: "A" "B" "B" "B" "C"
2008 Aug 15
2
Combination with repetition
Hi there! I can't find any information about creating combinations with repetitions in R. The function combn() does create combinations, but _without_ repetitions. Here is what I need to do: svIter <- 1000 xx <- matrix(rnorm(m*n), c(m, n)) sequence <- seq(range(xx)[1], range(xx)[2], length.out = svIter^(1/q)) expand.grid(secuence, secuence, .../q times/..., secuence) That is,
2008 Aug 15
5
x-axis with month and year
Hey list! I have a csv-file with two variables: (Date,CMI) Date,CMI Jan-93,3.24 Feb-93,-2.56 . . . Dec-06, 8.25 When I want to plot this dataset, R is sorting the date in alphabetical order. Is there any way to tell R not to do it? I know it is probably an easy issue but I couldn't find a solution so far. I have seen so many tips already but can't apply it on my own dataset. Thank
2008 Aug 16
4
Dealing with NaN's in data frames
I am looking for the most efficient way to replace all occurrences of NaN in a data frame with NA. I can do this with a double loop, but it seems that there should be a higher level and more efficient way. With is.na, I could use ifelse, but if.nan seems not to have similar capabilities. TIA, Jon Peck Jon K. Peck jkpeck@aya.yale.edu [[alternative HTML version deleted]]
2008 Jul 20
3
Order of columns(variables) in dataframe
Dear R experts,   I have a dataframe with 4 columns (variables). I want to redorder (or reposition) these columns on the basis of a value in its last row. e.g.   df1<-data.frame( v1= c(2,3,1,9,5), v2=c(8,5,12,4,11), v3=c(7,8,2,6,9), v4=c(1,4,6,3,6))    > df1    v1 v2 v3 v4 1  2  8  7  1 2  3  5  8  4 3  1 12  2  6 4  9  4  6  3 5  5 11  9  6 I wanto to get the order of df1 on the basis of
2008 Jul 20
2
fill in area between 2 lines with a color
Hi - I'd like to have the area between 2 lines on a x-y plot be filled with grey, but I haven't had any luck using polygon or rect. (In reality, I'd like to do this for twice - once for a low group and once for a high group - and then I'd like to plot a set of data points for a 'normal' group together with these 2 grey areas.) Here's a simple example of the 2 lines:
2008 Aug 01
3
Newbie question: How to use tapply() on several vectors simultaneously
Dear R users, I have a newbie-question that I couldn't resolve after reading through several pieces of documentation and searching the archive. I have a data.frame containing experimental data from a group experiment in psychology. Each line represents a single participant, but participants were assigned to groups of three or four persons. One variable indicates each participants'
2008 Jul 18
2
column wise paste of data.frames
Hi everybody! I'm sure that I overlook something and feel quite stupid to ask, but I have not found an easy solution to the following problem: Take e.g. the Orthodont data from the nlme package: > head(Orthodont) Grouped Data: distance ~ age | Subject distance age Subject Sex 1 26.0 8 M01 Male 2 25.0 10 M01 Male 3 29.0 12 M01 Male 4 31.0 14 M01 Male
2008 Jul 23
18
Simple... but...
Hi R, If x=c(1,3,5) y=c(2,4,6) I need a vector which is c(1,2,3,4,5,6) from x and y. How do I do it? I mean the best way.... Thanks, Shubha This e-mail may contain confidential and/or privileged i...{{dropped:13}}
2008 Sep 01
3
convenient way to calculate specificity, sensitivity and accuracy from raw data
Dear R-colleagues, this is a question from a R-newbie medical doctor: I am evaluating data on inter-observer-reliability in endoscopy. 20 medical doctors judged 42 videos filling out a multiple choice survey for each video. The overall-data is organized in a classical way: observations (items from the multiple choice survey) as columns, each case (identified by the two columns "number of