Displaying 20 results from an estimated 9000 matches similar to: "Making a new package: licence"
2005 Jun 20
3
vectorisation suggestion
Hi All,
I am counting the number of occurrences of the terms listed in one
vector in another vector.
My code runs:
for( i in 1:length(vector3)){
vector3[i] = sum(1*is.element(vector2, vector1[i]))
}
where
vector1 = vector containing the terms whose occurrences I want to count
vector2 = made up of a number of repetitions of all the elements of
vector1
vector3 = a vector of NAs that is
2009 Jun 17
3
tiff() woes
Hello all,
a friend has a problem with tiff() which I was unable to help about. I
searched the error messages to no avail. When he tries:
tiff(filename = "FedeWhyDoesntThisBloodyWork.tif", width = 5, height =
5, units = "cm", bg = "white", res = 1200)
Error in tiff(filename = "FedeWhyDoesntThisBloodyWork.tif", width =
5, :
unable to start device
2009 Aug 04
1
fitted.values less than observed values
Hi All,
I have some data where the dependent variable is a score, low (1:3) or
high (8:9), and the independent variables are 21 genotypic markers.
I'm fitting a logistic regression on the whole dataset after
transforming the score to 0/1 and normal linear regression on the high
and low subsets.
I all cases I have a numer of cases of data 'duplications', i.e.
different
2009 Nov 13
4
R, NIH and FDA
Dear All,
I will soon be working with NIH and possibly FDA. Will I be able to
use R or will I be forced to use SAS?
Cheers,
Federico
--
Federico C. F. Calboli
Department of Epidemiology and Public Health
Imperial College, St. Mary's Campus
Norfolk Place, London W2 1PG
Tel +44 (0)20 75941602 Fax +44 (0)20 75943193
f.calboli [.a.t] imperial.ac.uk
f.calboli [.a.t] gmail.com
2008 Feb 18
2
predicting memory usage
Hi All,
is there a way of predicting memory usage?
I need to build an array of 86000 by 2500 numbers (or I might create
a list of 2 by 2500 arrays 43000 long). How much memory should I
expect to use/need?
Cheers,
Fede
--
Federico C. F. Calboli
Department of Epidemiology and Public Health
Imperial College, St. Mary's Campus
Norfolk Place, London W2 1PG
Tel +44 (0)20 75941602 Fax +44
2007 Nov 26
4
writing summary() to a text file
Hi All,
I would like to output the results of a function into a text file,
legible as a such. The function produces a summary quite like:
summary(lm(x ~ y + w * z))
[for instance]
and I am not clear how to save this summary into a text file
'automagically', because I need to be able to do it in a for() loop.
Cheers,
Federico
--
Federico C. F. Calboli
Department of Epidemiology
2006 Jun 19
3
MLE maximum number of parameters
Hi All,
I would like to know, is there a *ballpark* figure for how many
parameters the minimisation routines can cope with?
I'm asking because I was asked if I knew.
Cheers,
Federico
--
Federico C. F. Calboli
Department of Epidemiology and Public Health
Imperial College, St. Mary's Campus
Norfolk Place, London W2 1PG
Tel +44 (0)20 75941602 Fax +44 (0)20 75943193
f.calboli [.a.t]
2010 Apr 13
2
renaming factors *efficiently*
Hi All,
I have a data frame where a couple of columns are factors, with long and complex names. Everything works ok --in R, but I need to export the data so it can be used on a dumber program (one with a three letters name starting with S...). I know that those complex factor names are causing problems reading the data in from acsv file, so I was thinking of renaming the factors. Problem is, I
2012 Jan 28
3
logical subsetting, indexes and NAs
Dear All,
just a quick example:
> x = 1:25
> x[12] = NA
> x
[1] 1 2 3 4 5 6 7 8 9 10 11 NA 13 14 15 16 17 18 19 20 21 22 23 24 25
> y = x[x<10]
> y
[1] 1 2 3 4 5 6 7 8 9 NA
Is there any way of NOT getting NA for y = x[x<10]? Similarly
> y = x[x<15]
> y
[1] 1 2 3 4 5 6 7 8 9 10 11 NA 13 14
How do I get rid of the NA (not post
2008 May 08
3
lme nesting/interaction advice
Hi everyone,
I am confused on how to specify some nesting and interaction terma with lme().
I have a dataset where some flies where selected for accessory gland size, made
to mate in presence/absence of another male and the level of some protein
measured. Now the complex stuff.
The selection has been replicated twice, so that the selection term has got two
levels (large and small) with
2011 Dec 05
2
barplot ignoring col parameter
Hi All,
I'm having a problem with barplot:
mydata
[1,] 2 108 0 0 0 1 3 0 0 0 0 0 7 18 3 4 8 20 26 20 19 7 1 1
mycol = c(rep('yellow', 2), rep('white', 3), rep('orange',2), rep('white', 5), rep('orange',3), rep('red',9))
barplot(mydata, col = mycol)
gives me an uniformly yellow barplot. How do I solve this?
bw
Federico
2005 Jul 21
3
vectorising ifelse()
Hi All,
is there any chance of vectorising the two ifelse() statements in the
following code:
for(i in gp){
new[i,1] = ifelse(srow[i]>0, new[srow[i],zippo[i]], sample(1:100, 1,
prob =Y1, rep = T))
new[i,2] = ifelse(drow[i]>0, new[drow[i]>0,zappo[i]], sample(1:100,
1, prob =Y1, rep = T))
}
Where I am forced to check if the value of drow and srow are >0 for each
line... in
2011 Aug 03
2
strsplit and forward slash '/'
Hi All,
is there a way of using strsplit with a forward slash '/' as the splitting point?
For data such as:
1 T/T C/C 16/33
2 T/T C/C 33/36
3 T/T C/C 16/34
4 T/T C/C 16/31
5 C/C C/C 28/29
6 T/T C/C 16/34
strsplit(my.data[1,1], "/") # and any variation thereof
Error in strsplit(apoe[1, 1], "/") : non-character
2010 Jun 15
2
coxph and remaing events
Hi everyone,
I'm running a cox ph model on a dataset with a number of variables. Each variable has a different number of missing data, so that coxph() drops the individuals who are missing data at one or more variables. Because of this dropping (totally fine btw) I want to know how many events I am left with in the model. Is there a way of extracting them from the coxph() fit? or in any other
2007 Feb 07
1
spss file import
Hi All,
does anyone ever import old SPSS files in a sl3 format?
read.spss('file.sl3') does not seem to work... it's not recognised as
a supported SPSS format at all.
Best,
Fede
--
Federico C. F. Calboli
Department of Epidemiology and Public Health
Imperial College, St. Mary's Campus
Norfolk Place, London W2 1PG
Tel +44 (0)20 75941602 Fax +44 (0)20 75943193
f.calboli
2008 Jul 25
1
Plink bed files
Hi All,
does anyone know how to import binary .bed files generated by Plink (http://pngu.mgh.harvard.edu/~purcell/plink/
) into R? the Plink FAQ explains how to conver other types of files,
not the .bed.
Cheers,
Federico
--
Federico C. F. Calboli
Department of Epidemiology and Public Health
Imperial College, St. Mary's Campus
Norfolk Place, London W2 1PG
Tel +44 (0)20 75941602 Fax
2010 Nov 17
1
where are my pspline knots?
Hi All,
I am trying to figure out how to get the position of the knots in a pspline used in a cox model.
my.model = coxph(Surv(agein, ageout, status) ~ pspline(x), mydata) # x being continuous
How do I find out where the knot of the spline are? I would like to know to figure out how many cases are there between each knot.
Best,
Federico
--
Federico C. F. Calboli
Department of Epidemiology
2006 Apr 02
3
speeding up a recursive function
Hi All,
is there any general advice about speeding up recursive functions
(not mentioning 'don't use them')?
Regards,
Federico Calboli
--
Federico C. F. Calboli
Department of Epidemiology and Public Health
Imperial College, St. Mary's Campus
Norfolk Place, London W2 1PG
Tel +44 (0)20 75941602 Fax +44 (0)20 75943193
f.calboli [.a.t] imperial.ac.uk
f.calboli [.a.t]
2005 Jul 01
2
loop over large dataset
Hi All,
I'd like to ask for a few clarifications. I am doing some calculations
over some biggish datasets. One has ~ 23000 rows, and 6 columns, the
other has ~620000 rows and 6 columns.
I am using these datasets to perform a simulation of of haplotype
coalescence over a pedigree (the datestes themselves are pedigree
information). I created a new dataset (same number of rows as the
pedigree
2007 Mar 23
1
plotting symbol
Hi All,
can I have a plot where the symbol for the dots is smaller than pch
=20 but bigger than pch = '.'?
Best,
Fede
--
Federico C. F. Calboli
Department of Epidemiology and Public Health
Imperial College, St. Mary's Campus
Norfolk Place, London W2 1PG
Tel +44 (0)20 75941602 Fax +44 (0)20 75943193
f.calboli [.a.t] imperial.ac.uk
f.calboli [.a.t] gmail.com