search for: collumns

Displaying 20 results from an estimated 48 matches for "collumns".

Did you mean: columns
2009 Sep 27
2
Count number of zeros in a collumn
I have a matrix 700x2000 which is sampled in each cycle from another matrix 788x2000 with the numbers 0,1 and 9 There is one specific collumn of this matrix, dart[,1977], that usually, after the samplimg procedure has only 1 and 9 (because the zero frequency in this collumn is low). However, when this happens, I want to include an IF conditional in my code. so basically what i wanted to do was to
2010 Jul 30
1
Unique rows in data frame (with condition)
I have to deal with data frames that contain multiple entries of the same (based on an identifying collumn 'id'). The second collumn is mostly corresponding to the the id collumn which means that double entries can be eliminated with ?unique. a <- unique(data.frame(timestamp=c(3,3,3,5,8), mylabel=c("a","a","a","b","c"))) However
2010 Aug 04
4
Adding collumn to existing data frame
Hi experts, I am trying to write a very flexible method that allows me to add a new column to an existing data frame. This is what I have so far: add.column <- function(df, new.col, name) { n.row <- dim(df)[1] length(new.col) <- n.row names(new.col) <- name return(cbind(df, new.col)) } df <- NULL df <- data.frame(a=c(1,2,3)) df # corect: added NA to new collumn df <-
2011 Apr 20
2
'Record' row values every time the binary value in a collumn changes
My question is twofold. Part 1: My data looks like this: (example set, real data has 2*10^6 rows) binary<-c(1,1,1,0,0,0,1,1,1,0,0) Chromosome<-c(1,1,1,1,1,1,2,2,2,2,2) start<-c(12,17,18,20,25,36,12,15,16,17,19) Table<-cbind(Chromosome,start,binary) Chromosome start binary [1,] 1 12 1 [2,] 1 17 1 [3,] 1 18 1 [4,] 1
2009 Sep 13
2
(no subject)
How would I make a histogram using R from a table in excel that has 4 variables, but I only want to use 2 of the columns to make the histogram? [[alternative HTML version deleted]]
2012 Jan 05
1
match matrices of different lengths
was trying to match different matrices of different lengths with in the first collumn date and time info (yearmonthdayhourminute). the routine needs to return NA?s where data of either of the matrices is non existent. have been trying the following: #### x <- c(200112030003, 200112030004, 200112030005, 200112030006) y <- c(0.1, 1, 1.1, 1.5) a <- c(200112030004, 200112030005,
2009 Sep 23
1
BLUP with missing data
hello guys, I need to do a BLUP in the simplest model y = Xm + Zg + e however I have missing data in the analysis which I can?t consider as 0(zero). So I need to generate the matrix X'Z, Z'X and Z'Z step by step; I can?t use crossprod(x) #neither X'X <- t(x)%*%x because I should skip the elements with missing data in the matrix I?ll try to be more clear, supposing a matrix x
2005 May 24
4
Table Help
Reply to sender Reply to all Reply to folder Forward Move/Copy Delete Read previous item Read next item Get help information on the current window From: McMurtry, Benjamin G. To: 'r-help-request at stat.math.ethz.ch' Cc: Subject: Table Help Sent: 5/24/2005 4:33 PM Importance: Normal I have a very large table that I want to add some of the certain rows. The table is
2009 Nov 05
4
collumn error when exporting to Excel
Dear all, I am attempting to export my results (data.frame) created with the help of a number of you to Excel. In the procedure my column structure is however lost and all results are placed together into the first Excel column. I have tried: write(), write.table(), write.matrix(), export() and have the same results. I Have checked the import/export FAQ and did a Google search to no avail. Any
2008 Sep 29
3
replicating dataframe rows
Dear all, I have a data.frame like the sample below, and I would like to expand my data.frame using "population" variable. So, for each line of my data.frame I would like that the new data.frame have many rows as the population collumn. place<-c("place1", "place2", "place3", "place4", "place5") population<-c(100,200,300,50,30)
2010 Sep 06
1
combining collumns for data.frames
Hi This question is far less simple than the title suggests, please read carefully, thanks. I have 2 sets of data, both read into R >data1<-read.table ("1.txt", header=T, sep="\t") >data2<-read.table ("2.txt", header=T, sep="\t") >data1 Taxon stage1 stage2 stage3 stage4 T1 0 0 1 1 T2 0
2008 Aug 27
1
How to create additional columns?
I do have some data of dim 100*3 (i.e 100 rows and 3 columns ) stored in a txt file. I want to read the data into R, Perform the same operation in each row and store the result in a forth column( that I should create). I do not know how I can create a forth column to store the result of the operation for each row? -- View this message in context:
2008 Nov 16
4
duplicate values
Hei R Users, i have the following dataframe: Datetime Temperature and many more collumns 1 2008-6-1 00:00:00 5 2 2008-6-1 02:00:00 5 3 2008-6-1 03:00:00 6 4 2008-6-1 03:00:00 0 5 2008-6-1 04:00:00 6 6 2008-6-1 04:00:00 0 7 2008-6-1 05:00:00 7 8 2008-6-1 06:00:00 7 . ....
2003 Mar 07
24
Hello, I am trying to use 'R' for K-means simulatio, could you please advise me how I can read my data into a two dimesional array? Or is there any method which directly reads the excell file? Please let me know asap. Regards Skanda Kallur Cogito, Ergo Sum! Rene Descartes
2010 Jan 18
2
permutations from vectors out of a matrix
Dear R-Users, I'm relativley new to R and have the following problem. I need all permutations of the vectors created by the collumns of a matrix. I will give a small example: p=3 n=2^p-1 #number of obtainable vectors mat=matrix(0,p,p) for(i in 1:p) { mat[i:1,i]=1/i } mat is now a quadratic matrix and n is the number o...
2007 May 08
3
plotting a point graph with data in X-axis
Um texto embutido e sem conjunto de caracteres especificado associado... Nome: n?o dispon?vel Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070508/1c7def0a/attachment.pl
2005 Oct 20
1
having scaling problems with a histogram
Hello,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p> I would like to create a histogram from a data collumn consisting of 4 classes (0; 0.05;0.5;25;75). Due to the difference in scale the classes 0;0.05 and 0.5 are displayed within one combined bin by default with the code:Hist(x, scale="percent",
2016 Apr 14
0
help with OR confidence interval using probit link
...= summary(glm(pcr.data[,7]~boldBeta_individual+pcr.data$age,family=binomial(link=probit))) naive_answer = c(naive$coefficients[,1:3]) #naive estimates for #alpha (first 4 collumns: intercept; beta_intercept, beta_slope and age) and #and SE(last 4 collumns: intercept; beta_intercept, beta_slope and age) OR.naive = exp(1.6*coef(naive)) (till here works, the problem is with the confidence in...
2016 Apr 15
0
Odds Ratio and OR CI
...gt; > > I?m new with R L > > > > naive = > summary(glm(pcr.data[,7]~boldBeta_individual+pcr.data$age,family=binomial(link=probit))) > > naive_answer = c(naive$coefficients[,1:3]) > #naive estimates for > > > #alpha (first 4 collumns: intercept; beta_intercept, beta_slope and age) > and > > > #and SE(last 4 collumns: intercept; beta_intercept, beta_slope and age) > > > > OR.naive = exp(1.6*coef(naive)) > > > > (till here works, the problem is with the confidence interval) > >...
2010 Jul 14
1
Arrange values on a timeline
I have a set of labels arranged along a timeframe in a. Each label has a timestamp and marks a state until the next label. The dataframe a contains 5 such timestamps and 5 associated labels. This means, on a continious scale between 1-100, there are 5 markers. E.g. 'abc' marks the timestampls between 10 and 19, 'def' marks the timestamps between 20 and 32, and so on. a <-