Displaying 20 results from an estimated 20000 matches similar to: "My first package"
2014 Jan 20
1
[R-SIG-Mac] My first package
On 18 Jan 2014, at 14:31, Axel Urbiz <axel.urbiz at gmail.com> wrote:
> Hi All,
>
>
> I'm planning to submit my first package to R, and although I read all the
> documentation, I'm not very clear on the following 2 items, from which I'd
> appreciate your guidance:
>
>
> 1)I understand it is suggested to use the R dev version to build the
>
2011 Jul 08
3
Making a new package: licence
HI All,
I have written and succesfully uploaded a new package. The licence it is under is 'GPL' --no version. My assumption is, since all the code is written in R the licence R used for R would affect the code (hence my "GPL" stands for "whatever version of the GPL R is under")
I am happy with the licencing I used, but I'd like to ask if there is any transitive
2014 Jan 20
1
[R-SIG-Mac] My first package
On 20 Jan 2014, at 14:51, G?bor Cs?rdi <csardi.gabor at gmail.com> wrote:
> On Mon, Jan 20, 2014 at 4:31 AM, Federico Calboli <f.calboli at imperial.ac.uk> wrote:
> [...]
> Is it? this is news to me. I have a grand total of 2 packages up and I never ever used R-devel, and never ever had a problem, had a report of a problem or had a note from CRAn about my packages not being
2006 Sep 26
5
putting stuff into bins...
Hi All,
I have a vector of data, a vector of bin breakpoints and I want to put my data
in the bins and then extract fanciful informations like the mean value of each bin.
I know I can write my own function, but I would have thought that R should have
somewhere a function that took as arguments something like (data, breaks, what
to do with the data in the bins). I surey could not find it
2006 Feb 28
4
subsetting a list of matrices
Hi All,
I have a list of matrices:
> x
[,1] [,2]
[1,] 1 4
[2,] 2 5
[3,] 3 6
> y
[,1] [,2] [,3] [,4] [,5] [,6]
[1,] 18 21 24 27 30 33
[2,] 19 22 25 28 31 34
[3,] 20 23 26 29 32 35
> z =list(x,y)
I want to create a second list that is has a subset each matrix in the
list subsetting so I get the 2nd and 3rd row of each (and
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
2005 Mar 08
5
removing message: [Previously saved workspace restored]
Dear All,
I saved by mistake the environment I was working in after typing q(),
and now I get the annoying message:
[Previously saved workspace restored]
I have already deleted all the objects in the environment, saving it as
an empty environment, so it's just a matter of nitpicking I suppose. The
message does not appear if I start R from any other place in the
directory tree.
I am
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
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
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
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]
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
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
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 Jun 26
2
fisher information matrix
Hi All,
a colleague wants to calculate the Fisher information matrix for a model he
wrote (not in R). He can easily get the neg-log-likelihood and the best fit
parameters at the minimum. He can also get negLLs for other parameter values too.
Given these data, is there a way in R to calculate the Fisher information matrix?
Best,
Federico
--
Federico C. F. Calboli
Department of Epidemiology
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
2006 Feb 08
2
logical condition in vector operation
HI All,
I have a data frame such as:
> test
x y p d
[1,] 1 0 10 21 0
[2,] 2 3 11 12 0
[3,] 3 4 12 23 0
[4,] 3 5 13 24 0
and I want to perfor some operations on the first two coulums,
conditional on the uneqaulity values on the 3rd and 4th columns.
For instance:
j = 3
test[test[,1] == j, 5] = test[test[,1] == j,2] + test[test[,2] == j,1]
gives me the result:
test:
x y p d
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
2006 Mar 28
2
as.matrix and one row
Hi All,
I have the following problem:
x = c(1,2)
x
[1] 1 2
as.matrix(x)
[,1]
[1,] 1
[2,] 2
BUT, if I add:
y = c(3,4)
as.matrix(rbind(x,y))
[,1] [,2]
x 1 2
y 3 4
It does not transpose. Since I will need as.matrix() for a list of data
that is in one or more lines, I need as.matrix to behave in a consisten
fashions, so I get
as.matrix(x, whatever)
[,1] [,2]
x 1
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