search for: bartjoosen

Displaying 20 results from an estimated 37 matches for "bartjoosen".

2008 Nov 24
3
count the cumulative for each subject
I have a data set like the following: subject visit x1 1 1 0.5 1 2 1.2 1 3 0.7 2 1 0.4 2 2 0.6 2 3 1.0 ..... where x1 is the interval between the two visits. Now I want to calculate the cumulative intervals since the beinging, for example subject visit x1 cum 1 1 0.5 0.5 1 2 1.2 0.5+1.2 1 3 0.7 0.5+1.2+0.7 2 1 0.4 0.4 2 2 0.6 0.4+0.6 2 3 1.0 0.4+0.6+1.0 ..... is there an easy to generate the
2010 Oct 13
5
Regular expression to find value between brackets
Hi, this should be an easy one, but I can't figure it out. I have a vector of tests, with their units between brackets (if they have units). eg tests <- c("pH", "Assay (%)", "Impurity A(%)", "content (mg/ml)") Now I would like to hava a function where I use a test as input, and which returns the units like: f <- function (x) sub("\\)",
2009 Mar 06
1
Extract dates from dataframe
Hi, I have the following dataframe: ID Dates 1 16-07-01 06-10-95 2 24/01/02 06-10-95 3 16/01/02 16/08/94 12/01/91 And I would like to extract the dates, but couple the ID's to the right dates, eg: ID Dates 1 16-07-01 1 06-10-95 2 24-01-02 2 .... I have no clue about how to get started, looks something for the
2008 Sep 11
9
How to load functions in R
Hello, I am trying to use self created functions in other scripts than the one where they are stored. For the moment I am using the following structure of commands to do that: 1. Load the text file with the functions in the current script: x=parse("path") 2. transform the tex in a function: f1=eval(x[1]), f2=eval(x[2]) if more than one function is stored in the text file 3. use the
2010 Jul 15
3
Access web content from within R
Hi, I have to search in an online db for registered manufacturers of raw materials. Can I use R for the following: I have a list with monograph numbers eg: l <- c(198, 731,355) Now I want to make a dataframe, containing the monograph number and the information listed under COS: Certificate holder, certificate number, Status, Type Is this possible with R? kind regards Bart -- View this
2009 Feb 17
2
Chromatogram deconvolution and peak matching
Hi, I'm trying to match peaks between chromatographic runs. I'm able to match peaks when they are chromatographed with the same method, but not when there are different methods are used and spectra comes in to play. While searching I found the ALS package which should be usefull for my application, but I couldn't figure it out. I made some dummy chroms with R, which mimic my actual
2013 Jan 24
4
sorting/grouping/classification problem?
Hi, I'm a database admin for a database which manage chromatographic results of products during stability studies. I use R for the reporting of the results in MS Word through R2wd. But now I think I need your help: suppose we have the following data frame: ID rrt Mnd Result 1 0.45 0 0.10 1 0.48 0 0.30 1 1.24 0 0.50 2 0.45 3 0.20 2 0.48 3 0.60 2 1.22 3 0.40 3
2007 Mar 01
4
How to read in this data format?
Hi, I recieved an ascii file, containing following information: $$ Experiment Number: $$ Associated Data: FUNCTION 1 Scan 1 Retention Time 0.017 399.8112 184 399.8742 0 399.9372 152 .... Scan 2 Retention Time 0.021 399.8112 181 399.8742 1 399.9372 153 ..... I would like to import this data in R into a dataframe, where there is a column time, the first numbers as column names, and the
2007 Feb 10
4
Near function?
Hi, I have an integer which is extracted from a dataframe, which is sorted by another column of the dataframe. Now I would like to remove some elements of the integer, which are near to others by their value. For example: integer: c(1,20,2,21) should be c(1,20). I tried to write a function, but for some reason, somethings won't work x <- 1:20 near <- function(x,th) { nr <-
2005 Nov 04
1
t test on data frame
Hi, I have constructed a dataframe as follows: Oil <- rep(c("Oil1","Oil2","Oil3"),8) Comp <- rep(rep(c("C1","C2"),c(4,4)),3) Mth <- rep(c("M1","M1","M2","M2"),6) Meas <- rep(c(1,2),12) Result <- rnorm(24,mean=100, sd=5) df <- data.frame(Oil, Comp, Mth, Meas, Result) The same compound
2006 Jun 10
1
Maximum likelihood estimation of Regression parameters
Hi, I want to use Maximum likelihood to estimate the parameters from my regression line. I have purchased the book "Applied linear statistical models" from Neter, Kutner, nachtsheim & Wasserman, and in one of the first chapters, they use maximum likelihood to estimate the parameters. Now I want to tried it for my self, but couldn't find the right function. In the book, they give
2007 May 09
1
Fitting model with response and day bias
Hi, I'm trying to fit a model which has a response bias, but also a day to day bias. If I try to simulate the data, I don't get the right values with optim, and also I can't use the function to give a prediction interval. My simulated data are: DF <- as.data.frame(cbind(x=rep(1:10,2),dag=rep(1:2,each=10))) bias <- c(-0.2,0.5) DF$y <- ((DF$x-0.1) * 5)+2 +
2005 Dec 18
1
Fit non-lineair 3D Data
Hi, I have a problem with fitting a model: I made a dataframe with this data: a <- 1:3 b <- 1:3 c <- c(3, 2, 3, 2, 1, 2, 3, 2, 3) df <- expand.grid(a,b) df$result <- c names(df) <- c("A","B", "result") Although I can make a graph of the data: require(lattice) wireframe(result~A*B, data=df) I can't get a model to
2006 Jun 24
2
data frame search
Hi, I want to make a data frame which contains the positions of some searched values in another data frame. Like: Dataframe 1: 1 2 3 4 1 2 3 4 2 3 4 1 2 3 4 2 4 1 2 3 2 3 4 1 Let's say I searched on "4", then Dataframe 2 should contain: x y 1 4 1 8 2 3 2 7 3 1 3 7 I have written a routine, but it seems to me that it isn't that perfect: x<- 0
2009 Mar 06
3
how to omit NA without using ifelse
I have a 50*50 matrix,some entry are NAs,I want to replace these NA by 0,so can I use some syntax to do so other than using ifelse? I tried to use replace(a,NA,0),it didnt work~~(a is matrix name) Thanks~ [[alternative HTML version deleted]]
2007 Jul 31
3
Nonlinear optimization with constraints
Hello R community, I am using R for creating a model using optimization. I would like to ask if there is R-function/package for solving the problem below: Minimize sum(abs(exp^(Ai1 x1 + Ai2 x2 + ... + Aim xm - bi) - 1)), for each i = 1, ..., n. subject to Ai1 x1 + Ai2 x2 + ... + Ajm xm - bi <= c, where c is a scalar. (x is a vector of variables, A is nxm matrix, b is a vector)
2007 Aug 23
4
Calculating diameters of cirkels in a picture.
Hi, Maybe this is more a programming questions than a specific R-project question, but maybe there is someone who can point me in the right direction. I have a picture of cirkels which I took with a digital camera. Now I want to use the diameter of the cirkels on the picture for analysis in R. I can use pixmap to import the picture, but how do I find the outside cirkels and calculate the
2009 Apr 22
2
Exporting objects plotted with plot3d() - rgl package
...amma from 0 to Inf (Andreas Wittmann) > 143. Merging data frames, or one column/vector with a data frame > filling out empty rows with NA's (joe1985) > 144. Copula package (Roslina Zakaria) > 145. Re: automatic exploration of all possible loglinear models? > (bartjoosen) > 146. Re: Copula package (Pfaff, Bernhard Dr.) > 147. Re: Generate bivariate binomial data (ONKELINX, Thierry) > 148. Intervention Time Series Analyis Tutorial/Package > (Dominik Hattrup) > 149. Re: DNAcopy package in R (Ramon Diaz-Uriarte) > 150. R: Color code...
2010 Oct 15
0
nomianl response model
...h that the value of t varies according to the vector cevenl above. Why is this looping not working? Thanks in advance!!! Julia [[alternative HTML version deleted]] ------------------------------ Message: 72 Date: Wed, 13 Oct 2010 11:16:24 -0700 (PDT) From: Bart Joosen <bartjoosen at hotmail.com> To: r-help at r-project.org Subject: [R] Regular expression to find value between brackets Message-ID: <1286993784648-2994166.post at n4.nabble.com> Content-Type: text/plain; charset=us-ascii Hi, this should be an easy one, but I can't figure it out. I have a vector...
2009 Sep 11
3
For sending my R package as part of R-project
...est R text editors? (Patrick Connolly) 80. Constructing variables conditional on two indicators (Reynaerts, Jo) 81. Re: Constructing variables conditional on two indicators (Dimitris Rizopoulos) 82. Re: Linux R version: best? (Patrick Connolly) 83. Re: executing rscript from VB (bartjoosen) 84. how to do this? (Luca Braglia) 85. Re: sppolot: fill below minimum legend value (Paul Hiemstra) 86. ipred (MERAL YAY) 87. call Fortran from R (Giacomo Santini) 88. (no subject) (MERAL YAY) 89. How to compare the result of GLM and GAM (Dilli Prasad Rijal) 90. R - box design-scatt...