search for: collumn

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

Did you mean: column
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 count the number of zeros in this collumn...
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 sometimes I...
2010 Aug 04
4
Adding collumn to existing data frame
...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 <- add.column(df,c(1,2),'myNewColumn2') df # problem: not added, data frame should be extended with NAs add.column(df,c(1,2,3,4),'myNewColumn3') df However, there are two problems: 1) The column name is not renamed accurately but always set to 'new.col' . Surely thi...
2011 Apr 20
2
'Record' row values every time the binary value in a collumn changes
...t;2" "18" "d" "0" [20,] "2" "19" "f" "0" Many thanks in advance, Niels -- View this message in context: http://r.789695.n4.nabble.com/Record-row-values-every-time-the-binary-value-in-a-collumn-changes-tp3462496p3462496.html Sent from the R help mailing list archive at Nabble.com.
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, 200112030...
2009 Sep 23
1
BLUP with missing data
...ro) which is not missing, therefore I can?t just replace the missing values by 0(zero) and i can?t just remove it from the matrix because it would unbalance it A way to do it could be generate Z'X step by step e.g Z'X [1, 1] is equal the sum of the product between the elements in the first collumn of X and the first collumn of Z skipping the elements whenever there is a missing data However I can?t do this in R Does anybody know how to do it this way or an easier way to do it? -- View this message in context: http://www.nabble.com/BLUP-with-missing-data-tp25530949p25530949.html Sent from...
2005 May 24
4
Table Help
...6 Username2 10 Username3 12 Username3 10 Username3 16 Etc .... The data is sorted by Column 1 (Ie the username) then by columm 2 (The numbers). I want to combine the rows so it would be as follows: Username1 6 Username2 16 Username3 38 Is there easy way using a feature like bind to sum all of collumn two where column 1 is the same? Thanks! Ben
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) my.df<-data.frame(cbind(place,population)) my.df best wishes, miltinho astronauta brazil [[alternative HTML version deleted]]
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...
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", breaks="Sturges"). How can I display them all, or as unique classes, leaving out the res...
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 i...
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
...c' marks the timestampls between 10 and 19, 'def' marks the timestamps between 20 and 32, and so on. a <- data.frame(timestamp=c(3,5,8), mylabel=c("abc","def","ghi")) b <- data.frame(timestamp=c(1:10)) I would like to assign these labels as an extra collumn 'label' to the data.frame b which currently only consists of a the timestamp. The output would then look like this: timestamp label 1 1 NA 2 2 NA 3 3 "abc" 4 4 "abc"...