search for: sample1

Displaying 20 results from an estimated 69 matches for "sample1".

Did you mean: sample
2006 Sep 27
3
Converting text to numbers
Hi, I have Forecast Class and Observed Class in a data matrix as below. > Sample1 FCT OBS 1 1 5 2 2 4 3 3- 3+ 4 3 3 5 3+ 3- 6 4 2 7 5 1 I want to find the difference between Observed and Forecast Classes. How can I get this done? I tried to following to convert the 1 through 5 classes, to 1 through 7 for both OBS and FCT column. > Sample1$OBS2 <...
2012 Dec 04
2
computing marginal values based on multiple columns?
Hello all, I have what feels like a simple problem, but I can't find an simple answer. Consider this data frame: > x <- data.frame(sample1=c(35,176,182,193,124), sample2=c(198,176,190,23,15), sample3=c(12,154,21,191,156), class=c('a','a','c','b','c')) > x sample1 sample2 sample3 class 1 35 198 12 a 2 176 176 154 a 3 182 190 21 c 4 193...
2012 Jul 31
2
phantom NA/NaN/Inf in foreign function call (or something altogether different?)
...- I thought it would be best to be as complete as possible and to show the avenues I have explored. I'm trying to fit a linear model to data with a binary dependent variable (i.e. Target.ACC: accuracy of response) using lrm, and thought I would start from the most complex model (of which "sample1.lrm1" is a trimmed version). I got the error shown below. (sample1 is available at http://tinyurl.com/bwqq7ya) For info: > str(sample1) 'data.frame': 14022 obs. of 5 variables: $ Target.ACC : Factor w/ 2 levels "0","1": 2 2 2 2 2 2 2 2 2 2 ... $ Word.Ord...
2012 Jan 25
4
help to slip a file name using "strsplit" function
Dear Researchers, I have several files as this example: Myfile_MyArea1_sample1.txt i wish to split in "Myfile", "MyArea1", "sample1", and "txt", becasue i need to use "sample1" label. I try to use "strsplit" but I am able just to split as "Myfile_MyArea1_sample1" and "txt" OR "Myfile",...
2010 Sep 07
1
average columns of data frame corresponding to replicates
...s repeated. I would like to create a new data frame so that the repeated ids are averaged. For example, in the new data frame, columns 1, 3, and 5 of the original will be replaced by 1 new column that is the mean of these three. Thanks for any suggestions. Juliet myData <- data.frame("sample1.id1" =rep(1,10), "sample1.id2"=rep(2,10), "sample2.id1" = rep(2,10), "sample1.id3" = 1:10, "sample3.id1" = rep(1,10), "sample1.id4" = 1:10, "sample2.id2" = rep(1,10)) repeat_ids <- c("id1","id2")
2011 Sep 26
1
How to Store the executed values in a dataframe & rle function
Hi group, This is how my test file looks like: Chr start end sample1 sample2 chr2 9896633 9896683 0 0 chr2 9896639 9896690 0 0 chr2 14314039 14314098 0 -0.35 chr2 14404467 14404502 0 -0.35 chr2 14421718 14421777 -0.43 -0.35 chr2 16031710 16031769 -0.43 -0.35 chr2 16036178 16036237 -0.43 -0.35 chr2 16048665 16048724 -0.43 -0.35 chr2 37491676 37491735 0 0 ch...
2011 Sep 03
1
Loop with random sampling and write.table
Hi! I need to perform this simple sampling function several hundred times: x1=as.character(rnorm(1000, 100, 15)) x2=as.character(rnorm(1000, 150, 10)) y1=as.data.frame(x1,x2) sample1=as.data.frame(sample(y1$x1, 12, replace = FALSE, prob = NULL)) sample1 write.table(sample1, "sample1.txt", sep=" ",row.names=F,quote=F) My knowledge of loops is quite low. How can I produce 100 loops of the sampling leading to 100 files from sample1.txt to sample100.txt? Thank...
2011 Aug 14
2
conditional filter resulting in 2 new dataframes
This is what I am starting with: initial<- matrix(c(1,5,4,8,4,4,8,6,4,2,7,5,4,5,3,2,4,6), nrow=6, ncol=3,dimnames=list(c("1900","1901","1902","1903","1904","1905"), c("sample1","sample2","sample3"))) And I need to apply a filter (in this case, any value <5) to give me one dataframe with only the 'less than 5' values and with '0' place holders on the values that don't meet this criteria. The second dataframe is the same but...
2009 Feb 02
1
A question regarding bootstrap
Dear List Members, I have two small samples (n=20), the distributions are highly skewed. Does it make any sense to do a boostrap test to check for difference in means? And if so, could this be done like this: x <- numeric(10000) for(i in 1:10000) { x[i] <- mean(sample(sample1,replace=TRUE)) - mean(sample(sample2,replace=TRUE)) } (mean(sample1)-mean(sample2))/sd(x) Regards, Erika [[alternative HTML version deleted]]
2005 Apr 07
2
MailScanner SPAM Forward & Postfix Problem
First, thanks to the CentOS folks for creating such as awesome distro! Second, thanks to all for contributing to such an great mailling list! I installed MailScanner/SpamAssassin/ClamAV last week based on the excellent threads that have recently discussed the subject. For folks who missed it, I used Johnny's wonderful guide at http://www.hughesjr.com/content/category/1/14/30/Guides (see
2010 May 02
1
Re :argument is not numeric or logical
Hi all, I have data size of : > dim(sample) [1] 35943 17 The first column is "stdate" - is date ( 01/11/2009 00:00:00,02/11/2009 00:00:00,02/11/2009 00:00:00 etc... ) Login is 13th column - is numbers (12,0,1 erc...) The below operation return the following error. > sample1 <- read.csv(file="sample1.csv",sep=",",header=TRUE) > avglog <- with(sample1, tapply(Login, stdate, mean)) Warning messages: 1: In mean.default(X[[1L]], ...) : argument is not numeric or logical: returning NA 2: In mean.default(X[[2L]], ...) : argument is not numer...
2009 Nov 28
1
'Are you sure?' custom dialog not exiting cleanly
The following program does not exit cleanly after pressing ''Yes'' when asked ''Are you sure''? How do I free up the resources after exiting? You can use wxsugar (xrcise) to try out this mini program if you wish to create sample1.rb . Thank you. -Philip =========== asample1.rb ==================================================== require ''wx'' require ''sample1.rb'' class DIA_Frame < DiaFrame def on_init set_affirmative_id(Wx::ID_YES) set_escape_id(Wx::ID_NO) end end cl...
2020 Jun 04
2
Preserving destination group and owner
...keeped, there is something not working as expected or I'm missing something about owner and group, at least when I run rsync as root/sudo. Just to get a quick (non-)working example, when I run this commands (delete files, create two different files, rsync them) as a non-root user: sudo rm /tmp/sample1 /tmp/sample2 2> /dev/null /bin/date > /tmp/sample1 sleep 3 /bin/date > /tmp/sample2 echo "Before rsync:" ls -l /tmp/sample1 /tmp/sample2 sudo rsync -r --no-o --no-g /tmp/sample1 /tmp/sample2 echo "After rsync:" ls -l /tmp/sample1 /tmp/sample2 I get this: Before rsync...
2012 Mar 29
1
Random sample from a data frame where ID column values don't match the values in an ID column in a second data frame
Hello, Let's say I've drawn a random sample (sample1.df) from a large data frame (main.df), and I want to create a second random sample (sample2.df) where the values in its ID column *are not* in the equivalent ID column in the first sample (sample1.df). How would I go about doing this? In other words: The values in sample2.df$ID *are not found* i...
2013 Nov 21
2
Running R embedded in an mpiexec spawned process - Fatal error: you must specify '--save', '--no-save' or '--vanilla'
I'd like someone familiar with the R options initialization to comment on a difference of behavior within/without mpiexec I have a (.NET) application with embedded R that is proven to run in a single process: ./Sample1.exe on a Debian Linux with R 3.0.2 Running the same code with mpiexec, it fails at the R engine initialization: mpiexec -n 1 ./Sample1.exe Fatal error: you must specify '--save', '--no-save' or '--vanilla' ------------------------------------------------------...
2007 May 10
1
how to pass "arguments" to a function within a function?
...oblem: various inputs for "FUN" will require different arguments. These arguments will be contained in the column names of "vars". How do I pass these arguments to FUN()? My example and my attempt: what I am trying to do, successfully accomplished without a function: x='sample1' y='sample2' sample1=c(222,333,444) sample2=c(100,200,300) minus <- function(x,y) {get(x)-get(y)} minus(x,y) ######################################################### #My so-far failing attempt to write a function to do the same thing: vars.in = data.frame(x='sample1',y=...
2011 Mar 26
2
simple if question
...dataframe (for example, 0 = no selected, 1= sample 1, 2=sample 2, etc.). I have tried to do it with ifelse command, but the problem is that the second line replaces the values of the first line, and I haven't been able to do it with the if command (I got this error: In if (data$school %in% sample1) { : the condition has length > 1 and only the first element will be used) data$selection <- ifelse(data$school %in% sample1, 1, 0) data$selection <- ifelse(data$school %in% sample2, 2, 0) Any ideas? Thank you in advance. -- Sebasti?n Daza sebastian.daza at gmail.com
2010 Nov 04
2
Converting Strings to Variable names
Hi all, I am processing 24 samples data and combine them in single table called CombinedSamples using following: CombinedSamples<-rbind(Sample1,Sample2,Sample3) Now variables Sample1, Sample2 and Sample3 have many different columns. To make it more flexible for other samples I'm replacing above code with a for loop: #Sample is a string vector containing all 24 sample names for (k in 1:length(Sample)) { CombinedSamples<-rbi...
2009 Sep 16
2
T-test to check equality, unable to interpret the results.
Hi, I have the precision values of a system on two different data sets. The snippets of these results are as shown: sample1: (total 194 samples) 0.6000000238 0.8000000119 0.6000000238 0.2000000030 0.6000000238 ... ... sample2: (total 188 samples) 0.80000001 0.20000000 0.80000001 0.00000000 0.80000001 0.40000001 ... ... I want to check if these results are statistically significant? Intuitively, the similarity in the t...
2008 Jul 26
4
parametric bootstrap
Hi I am trying to find a parametric bootstrap confidence interval and when I used the boot function I get zero bias and zero st.error? What could be my mistake? Thank you and take care. Laila [[alternative HTML version deleted]]