similar to: get the rows so that there is no redundant element in a certain column

Displaying 20 results from an estimated 9000 matches similar to: "get the rows so that there is no redundant element in a certain column"

2008 Mar 19
1
weibull model
Dear Helpers: If you know how to fit a Weibull model using R, you are my savior for my project. The hazard ramda is specified as t^alpha * (1+a*dose*exp(-b*dose)). Or, can we modify the Cox model to capture the proportional part above? Here t is the survial time, dose is a subject received in a exposed group. Thank you a lot. Boshao
2010 Jan 11
2
help needed to find zero areas in a vector
Dear Helpers:   I spend more than half a day to solve this problem in R:   Let x be a vector of a string of 0s and 1s, such as x<-c(0,0,1,1,0,0,0,0,1,1,0,0,0,0). It can be a very long vector. How to sub vectors of 0s? In the above example, I would like get the vectors (0,0), (0,0,0,0), (0,0,0,0). I can use which(x==0) to get the index of the 0 elements, but I don't know how to get the
2004 Jul 13
1
MLE, precision
Hi, everyone I am trying to estimate 3 parameters for my survival function. It's very complicated. The negative loglikelihood function is: l<- function(m1,m2,b) -sum( d*( log(m1) + log(m2) + log(1- exp(-(b + m2)*t)) ) + (m1/b - d)*log(m2 + b*exp(-(b + m2)*t) ) + m1*t - m1/b*log(b+m2) ) here d and t are given, "sum" means sum over these two vairables. the parameters
2007 Nov 26
1
pass lm( ) a char vector as the variables to be included
Dear Everyone in list: I am writing some codes to automate the process of fitting linear models where the names of variables of models are produced and stored in character vectors. But I have problems to pass the vectors to the lm( ) because I don't know how to strip the quotation marks automatically. Here are the codes of the example of lm( ): ## Annette Dobson (1990) "An Introduction
2008 May 09
1
Rescaling a column in a matrix based on a certain rows
Hi, Let say I have this matrix: > mat<-matrix(cbind(rnorm(20),rnorm(20)), ncol = 2) And I want to rescale values of column [,1] and [,2] using values from row 1 to 5, such that the values of row 1:5 should be rescale to the same amplitude (kinda like take the z-score of population from row 1:5). column 1 and 2 are two different samples need to be compared. I hope I made myself clear
2012 Jul 02
4
Removing rows if certain elements are found in character string
I would like to remove rows from the following data frame (df) if there are only two specific elements found in the df$ch character string (I want to remove rows with only "0" & "D" or "0" & "d"). Alternatively, I would like to remove rows if the first non-zero element is "D" or "d".
2009 Dec 17
4
Shorewall time element rules never works ?
Hi all, I Try use shorewall rules with time element but its never works, the rules look like this HTTPS(REJECT) loc net:69.63.181.11,69.63.181.12,69.63.184.142,69.63.187.17,69.63.187.19 localtz&timestart=20:00&timestop=20:10&weekdays=Mon,Tue,Wed,Thu,Fri This rules for block https access to facebook site at working hours & day My system is Debian lenny, shorewall 4.4.4.2 kernel
2024 Feb 15
1
certain pipe() use cases not working in r-devel
? Wed, 14 Feb 2024 14:43:12 -0800 Jennifer Bryan <jenny.f.bryan at gmail.com> ?????: > But in r-devel on macOS, this is silent no-op, i.e. "hello, world" > does not print: > > > R.version.string > [1] "R Under development (unstable) (2024-02-13 r85895)" > > con <- pipe("cat") > > writeLines("hello, world", con) I
2010 Jul 01
1
[LLVMdev] The question about how to refer an element in a pointer array by a dynamic index by IR
Now I am trying to use LLVM to write a simulator and take LLVM as IR to dynamic translate machine code, I encounter some issues when try to write some IR to express writting a value to the reigster. The situation is described as the following description. write_reg is my function for writing "v" to the register indicated by "index". ptr_gpr is the struct pointer for my
2011 Oct 31
1
how to remove the redundant rows of a matrix
Hi, I have a matrix like this, two columns: a, b a b c1 21 c2 19 c2 20 c2 20 c4 25 c5 18 c5 18 how to prepare a new matrix removing the rows with repeated units in b columns, like there are two 20 and two 18 in b column (others are unique in b col). I wanna a pure matrix with one 20 and one 18. Thanks a lot! Yan [[alternative HTML version deleted]]
2006 Apr 17
1
document.getElementsByClassName (prototype) and Element.childrenWithClassName (scriptaculous) redundancy?
Is there a reason scriptaculous provides what appears to be a redundant function? The reason I''m asking is that it only seems to be used twice throughout all of scriptaculous, and it doesn''t appear to work properly (for some reason it''s returning the actual element, rather than an array with all of the elements) If there is no reason, I''ll modify it to use
2024 Feb 14
2
certain pipe() use cases not working in r-devel
Hello, I've noticed a specific type of pipe() usage that works in released R, but not in r-devel. In 4.3.2 on macOS, I can write to a connection returned by pipe(), i.e. "hello, world" prints here: > R.version.string [1] "R version 4.3.2 (2023-10-31)" > con <- pipe("cat") > writeLines("hello, world", con) hello, world But in r-devel on
2004 Mar 05
1
selecting certain rows from a data.frame
Hi, First of all - thank you for the answers regarding shared library. If i am attempting to translate the library from Linux to Windows - i think i will need some heavy baby-sitting ;-))) It is way out of my league - for now. Meanwhile i have this new question: suppose i have a data.frame with x and y columns and 10 rows, 1 to 10. I also have a variable m (or an array if you like) with 5
2008 Jun 18
1
Extract only certain rows from a table
Hi, I have a table where column 1 has ID numbers and column two has data, and I have a vector containing a subset of those ID numbers. How can I create a new table with only the rows from the old table that match the IDs in the vector, like below: Original Table: ID Value 1 123 2 123 3 123 4 123 vect: [2, 3] New table: ID Value 2 123 3 123
2010 Apr 10
2
selecting certain columns or rows from a .csv
Hello, I'm using <read.csv("filename",header=TRUE) but need to extract just certain columns or rows from the file. Much thanks. -- View this message in context: http://n4.nabble.com/selecting-certain-columns-or-rows-from-a-csv-tp1835692p1835692.html Sent from the R help mailing list archive at Nabble.com.
2010 May 29
1
modifying only certain rows in a data-frame
Hi, I have a data-frame r (shown below is a subset) with the following column names: date time sample vct norm hct deltact $time has 8 levels: 0h, 0.5h, .....24h. $deltact holds real numbers. I want to subset this dataframe by the levels of $time. For all the rows which have r$time == "0h" I would like to convert the present value of r$deltact to 0. Any pointers to a
2008 May 19
1
Select certain elements from dataframe
Hello, I have a specific problem, I have a large dataframe, and after clustering I want to select certain colums, the elements of a subcluster. My dataframe looks like this : > colnames(data) [1] "101KF4319097339" "102KF4319101170" "103KF4319047549" "104KF4319046389" [5] "105KF4319013260" "106KF4319025582"
2009 Apr 07
1
use the value of variable to quote certain elements in matrix
Hi, I want to use the value of variable to quote elements in matrix. For example, I have a matrix like:               y1   y2m1         1      2m2         3      4 where y1,y2,m1,m2 are column and row names.  I have two random character variable, say x,  that could be either  y1 or y2  and  y that could be either m1 or m2.  So can I  do like   Matrix[y,x] to quote elements?  I've tried this
2011 Apr 23
2
replace certain elements in data frame
Hello, I have a data frame with 2 columns: year and code. In code column, I want to replace elements that are not "8210", "8310", or "9190" with "others". -- Sincerely, Yosub Jung. [[alternative HTML version deleted]]
2011 May 19
1
vectorial search for elements with certain attributes
I have 2 vectors A and B. For each element of B I'd like to find the index of the next higher or equal element in A. And I'd like to store it effectiv. E.g.: A <- c(1,3,7,8,10) B <- c(5,8) result: 3, 4 I have a possibility but for long vectors it works not very effectiv: ans <- sapply(B, function(x) which.max(A[A < x]) ) as.integer(ans + 1) Is there anyone how has a better