similar to: random samples

Displaying 20 results from an estimated 10000 matches similar to: "random samples"

2005 Jan 14
5
subsampling
hi, I would like to subsample the array c(1:200) at random into ten subsamples v1,v2,...,v10. I tried with to go progressively like this: > x<-c(1:200) > v1<-sample(x,20) > y<-x[-v1] > v2<-sample(y,20) and then I want to do: >x<-y[-v2] Error: subscript out of bounds.
2005 Jan 12
4
(no subject)
hi, I am trying to grow a classification tree on some data, but I have a little problem. In order to do so I have to use a function like "tree" in R and on the internet help(tree) I get the following: "The left-hand-side (response) should be either a numerical vector when a regression tree will be fitted or a factor, when a classification tree is produced" I would like to
2005 Jan 01
4
plot
Is it possible to make multiple plots i.e. to represent more than one function on the same figure? Thank you Email: botti23@libero.it [[alternative HTML version deleted]]
2006 Mar 08
5
data import problem
Dear All, I'm trying to read a text data file that contains several records separated by a blank line. Each record starts with a row that contains it's ID and the number of rows for the records (two columns), then the data table itself, e.g. 123 5 89.1791 1.1024 90.5735 1.1024 92.5666 1.1024 95.0725 1.1024 101.2070 1.1024 321 3 60.1601 1.1024 64.8023 1.1024 70.0593
2003 Nov 07
5
Barplots
Hello, Can anyone tell me how to label individual bars on a barplot? I want to put an "*" or letter ABOVE the bar to denote statistical significance. Is this possible and how? Thanks, Suzanne __________________________________________________________________ McAfee VirusScan Online from the Netscape Network. Comprehensive protection for your entire computer. Get your free trial
2006 Oct 17
1
Convert Contingency Table to Flat File
Hello All, Is there any R function out there to turn a multi-way contingency table back to a flat file table of individual rows and attribute columns.? Thanks! marco --------------------------------- [[alternative HTML version deleted]]
2006 Mar 15
3
click on graph and select data points?
Hi all, I am doing some clustering and the clustered results are presented in a "pairs" plot showing 4 clusters... I made the data points belong to 4 different clusters displaying different colors. Now I want to select the best clustered class, how can I click on the data point, and the program returns the index of that cluster(its class number, or color number)? Also, if I would
2006 Apr 16
1
string vector indices
Hi, I have a string vector, say, x <- "a", "aab" and anther string vector, say, y <- "a", "aa", "aab", "aabc". Is there any R function to get the indices of y for the elements of x, that is, foo(x, y) will give me the index vector c(1, 3)? I know i can combine apply() and grep("^aab$", y) to do it. But is there any
2006 Jul 21
1
Merge two dataframes of different column length and row length by two columns at a time
Hello, I have two dataframes of the following structures: str(a) `data.frame': 1354896 obs. of 14 variables: $ V1 : int 0 1 2 3 4 5 6 7 8 9 ... $ V2 : int 0 0 0 0 0 0 0 0 0 0 ... $ V3 : int 74 12305 103 12337 46 57 12446 90 12097 79 ... $ V4 : num 11.8 1529.2 17.8 1579.4 6.7 ... $ V5 : int 88 11040 104 11557 56 58 11040 74 10991 81 ... $ V6 : num 15.5 1921.3 20.3
2006 Nov 12
1
How to increase decimal places
Hello everyone, does anybody know how to increase the decimal places that R uses to calculate something. I think that in default R uses 6 decimal places but I need 12. Thank you very much! Best regards, Maja! --
2006 Mar 14
2
name of the graphics output
Hello. In the file list.txt, I have the name of n files in data frame format. I want to make an image for each file and save the images in pdf format. To do this, I do the following: llista = scan(file="list.txt",what=list(nom="")) for (file.name in llista[[1]]){ aux=read.table(file=file.name) aux=as.matrix(aux) pdf() image(aux)
2004 Mar 11
6
saving a data.frame to "\t" files
Windows 2000, updated R and packages. could somebody pleaseeeeeeeee help with saving a data.frame with column names into "\t" text files for later importing in other programs? It seems an easy task, yet... it beats me. thanks, Mihai Nica Jackson State University [[alternative HTML version deleted]]
2006 Apr 07
3
simple if statement
I am ashamed to be asking this question, but I couldn't find the solution anywhere. Searching for "if" and "R" is not very productive... I cannot get a simple if statement to work. I have data on college students. I want to make a string variable that has the names of the years. That is, when the year variable i is equal to 1, I want to have a variable called years
2006 Jun 20
3
how to put the results of loop into a dataframe
Dear friends, suppose i want to do the following caulation for 100 times, how to put the results of x , y and z into the same dataframe/dataset? x<-runif(1) y<-x+1 z<-x+y thanks in advance! -- Kind Regards, Zhi Jie,Zhang ,PHD Department of Epidemiology School of Public Health Fudan University Tel:86-21-54237149 [[alternative HTML version deleted]]
2006 Oct 21
4
one is not one
Folks, I have got a strange behaviour when testing this: sum(x) != 1 let us set x<-c(70,134,1,5,0) and transform it in a vector of probabilities x<-x/sum(x) One expect sum(x) should be equal to 1, which is apparently the case > sum(x) [1] 1 However, when I try to test it I get: > if(sum(x) !=1) print("lost") else ("OK") [1] "lost" Which means
2006 Oct 26
3
Read.csv
Are there ways to load a csv file without row.names by read.csv? Thanks. [[alternative HTML version deleted]]
2006 Jun 17
2
managing data
Dear mailing list, may some one be kind to help me solve following problem. I am trying to write a code that will combine two tables "x" and "y". The first columns of both tables are unique identification for the rows. The first column of table "X" is a sub set of the first column of "Y". I need to find the matching rows in both tables by looking on their
2007 Jun 02
4
Datapoints underneath datapoints Problem
Hi there. I have the following graph: http://www.nabble.com/file/p10928148/map.jpg However, some datapoints occur at the same place as other datapoints and are so layered on top of each other. I would like to know if there is any possible way in which I could view those datapoints that are layered on top of each other ...maybe by rotating using latitude to show the datapoints underneath (but
2006 Oct 11
4
Help on direction of axis in R needed
Hi! I'd like to plot things with axes going from the highest to the lowest value, so that e.g. high values on the xaxis are plotted to the left and low values to the right. Could anyone tell me how this is done? I couldn't find anything in the documentation. Thanks a lot! Silli
2006 Apr 27
3
relative frequency plot
Hi All, I want to use "hist" to get the relative frequency plot. But the range of ylab is greater than 1,which I think it should be less than 1 since it stands for the probability. Here is my code: x<-c(1,1,1,0,0,1,1,5,1,1,0,1,1,0,1,0,1,1,0,0,1,1,1,1,1,1,1,1,1,4,1,0,2,1,1,1 ,1,1,0,0,1,0,1,1,1,1,1,1,1,1,1)