similar to: dataset index

Displaying 20 results from an estimated 11000 matches similar to: "dataset index"

2009 Dec 15
2
Reconstruct a dataset
Dear all, I have a dataset that looks like this: inividual var1 var2 ? 1 1 1 ? 2 1 2 ? 3 2 1 ? 4 2 2 ? ? ? ? ? I will random sample 2 individuals from this dataset based on a set of random numbers, e.g., rn1 <- c(0, 0, 1, 1), rn2 <- c(0, 0, 2, 0), rn3 <- c(1, 0, 0, 1), rn4 <-
2011 Apr 26
6
Tell the difference between characters
Dear all, I just want to determine if the characters in a character string are the same or not. For example, temp <- c("aa", "aA", "ab") How do I determine the first one have the two same ?a?, and the second and third have the different characters? Thanks in advance. Lisa -- View this message in context:
2010 Jan 25
5
Data transformation
Dear all, I have a dataset that looks like this: x <- read.table(textConnection("col1 col2 3 1 2 2 4 7 8 6 5 10"), header=TRUE) I want to rewrite it as below: var1 var2 var3 var4 var5 var6 var7 var8 var9 var10 1 0 1 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 1 0 0
2011 Apr 27
4
Pause the execution of a function
Dear all, I am trying to write a script to pause the execution of a function and provide some additional commands to the function and then continue execution of the function. For example, when my function detects a wrong number in a dataset, the function pauses automatically and returns information on the screen: ?There is a wrong number in the dataset. Would you like to correct it? ? If I
2010 Jan 08
4
Arguments of a function
Dear all, I have a question about how to set arguments in my own function. For example, I have a function that looks like this: my.f <- function(a = x1, b = x2) { x1 = equation 1 x2 = equation 2 x3 = equation 3 y = a + b } x1, x2, and x3 are temporary variables (intermediate results) calculated from other variables within the funciton. I want to use two of these three
2009 May 21
3
index to select rows of a large matrix
Dear R Users, I have created a 1500 x 20000 data frame - DataSeq. Each of the 1500 rows represents a data sequence. I have another data frame iData that stores the information of these 1500 data sequences in the same order, for example, condition, gender, etc. If I use "subset" to select certain groups within iData according to some criteria that I have set, e.g. condition, gender Then
2004 Sep 09
2
GEE model
Hello there, My name is Lisa and I'm doing analysis using genelized linear model-GEE model because I have some repeated measurements on the same patients (in a bilateral eye disease case). It would be very appreciated if you could shed some light on what function to use in R. Thank you very much Lisa Wang Msc. Toronto,Ca
2011 May 26
2
matching by gender and age
Hello R gurus, I have a data set from which i have to extract the gender and age matched rows from controls and disease group disease<-paste(rep(c('y','n'),11)) gender<-paste(rep(c('m','f'),11)) mcp<-rnorm(700,1400) age<-rnorm(32,34) dat<-data.frame(disease=disease,sex=gender,Dr_age=age[1:22],MCP=mcp[1:22]) I have other categorical variables also to
2010 Jan 25
2
Delete components of a list
Dear all, I have a question about deleting components of a list. For example, I have a list that looks like this: [[1]] var1 var2 var3 1 3 4 2 2 1 [[2]] var1 var2 var3 2 5 1 2 1 7 [[3]] var1 var2 var3 1 6 7 3 8 4 How to delete, say, the first columns of the list or the second rows? Thank in advance. Lisa -- View
2011 Jun 01
5
Recode numbers
Dear all, I have two sets of numbers that look like a <- c(1, 2, 3, 3, 4, 4, 5, 6, 1, 2, 2, 3, 1, 2, 1, 2, 3, 3, 4, 5, 1, 2, 3, 4) b <- c(1, 5, 8, 9, 14, 20, 3, 10, 12, 6, 16, 7, 11, 13, 17, 18, 2, 4, 15, 19) I just want to use ?b? to encode ?a? so that ?a? looks like a1<- c(1, 5, 8, 8, 9, 9, 14, 20, 3, 10, 10, 12, 6, 16, 7, 11, 13, 13, 17, 18, 2, 4, 15, 19) Does anyone have a
2009 Mar 07
2
ttest in R
Dear list, i am a biologist who needs to do some ttest between disease and non disease, sex, genotype and the serum levels of proteins on a large number of individuals. i have been using excel for a long time but it is very tedious and time consuming. i am posting the data below and ask your help in generating a code to get this analysis done in R. thanks gender disease genotype data M N CC
2011 May 26
3
Suppress intermediate results on console
Dear all, I have a question about how to suppress intermediate results in a function on console. For example, I will use summary() in my own function that looks like: myfunction <- function(?) { ? Summary(x) ? } Then myfunction() will print ?x? on console that is intermediate result and doesn?t need showing. Does someone have any idea or any suggestion? Thank you in advance. Lisa
2011 Dec 19
2
summary vs anova
Hi, I'm sure this is simple, but I haven't been able to find this in TFM, say I have some data in R like this (pasted here: http://pastebin.com/raw.php?i=sjS9Zkup): > head(df) gender age smokes disease Y 1 female 65 ever control 0.18 2 female 77 never control 0.12 3 male 40 state1 0.11 4 female 67 ever control 0.20 5 male 63 ever state1 0.16
2009 Dec 04
1
User's function
Hello, All, I want to write a function to do some works based on the arguments. For example, bind some variables (arguments) as this: myfunction <- function(arg1, arg2, arg3, ?) { x <- cbind(arg1, arg2, arg3, ?) } myfunction(arg1, arg2, arg3, ?) The function can automatically determine the number of arguments and bind them, which means if I assign 2 arguments, the function can bind
2011 Mar 18
3
Arguments of a function
Hi, everybody, I just want to pass arguments to a function as below: range <- c(0.1, 0.5) runif(1, range) But it doesn?t work. Does anyone have any suggestions to offer? Thanks. Lisa -- View this message in context: http://r.789695.n4.nabble.com/Arguments-of-a-function-tp3387643p3387643.html Sent from the R help mailing list archive at Nabble.com.
2009 Nov 24
5
Split column
Hello, R users, I have a dataset that looks like this: id var1 var2 1 1 3 2 3 1 3 2 1 4 1 2 5 2 3 I want to split one column to two columns with 1 = 1 and 1, 2 = 1 and 2, 3 = 2 and 2: id var1.1 var1.2 var2.1 var2.2 1 1 1 2 2 2 2 2 1 1 3 1 2
2011 Mar 21
1
Randomly generating data
Hi, everybody, I have a problem and need your help. There are two columns that look like this: [1,] "t" "f" [2,] "f" "t" [3,] "t" "f" [4,] "t" "t" [5,] "f" "f" I just want to generate the third column based on these two columns. First, I randomly choose one of the two columns,
2011 Jul 14
2
R package: pbatR
Dear All, Does anybody have experience with R package pbatR (http://cran.r-project.org/web/packages/pbatR/index.html)? I am trying to use it to analyze the family-based case-control data, but the package totally doesn?t work on my computer. I contacted the authors of the package, but I haven?t heard anything from them. Following the package manual, I tried the simple example as below:
2003 Jul 08
3
Characters and Numeric Values in One Matrix
Dear R-Users, I want to ask a question for a colleague of mine. He wants to put a character vector and a numeric vector into one matrix and still have the old character and numeric type for the respective columns. Unfortunately, I am just starting using R and I could not help him. Is there an easy and straightforward way to do this in R? Maybe a little example facilitates understanding our
2002 Jan 25
2
selecting clusters of points
All: Are there any functions out there for selecting all the points in a region of a plot. I envision something like the identify() function except one could circle a cloud of points (and perhaps a vector would be returned of the same length as the points plotted indicating logical membership in the circled cloud). Perhaps someone has done something with the locator() function that would