Hello,
I use an imported dataframe and want to extract the mean value for one
column.
after typing mean (rae.df$VOL_DEP) I receive
[1] NA
Warning message:
Argument ist weder numerisch noch boolesch: gebe NA zurück in:
mean.default(rae.df$POINT_Y_CH)
But when i look into the dataframe the
Dear R-people,
I have to compute
C - -(pnorm(B)*dnorm(B)*B + dnorm(B)^2)/pnorm(B)^2
This expression seems to be converging to -1 if B approaches to -Inf
(although I am unable to prove it). R has no problems until B equals
around -28 or less, where both numerator and denominator go to 0 and
On 07/02/06 12:39, zhijie zhang wrote:
Dear friends,
i have a dataset like this:
x y z
1 2 3
2 3 1
3 2 1
1 1 3
2 1 2
3 2 3
2 1 1
I want to replace x with the following values:1-a,2-b,3-c,4-d;
replace y with the following values:1-b,2-a,3-c,4-d;
replace z
# reproducing your example
xx-x y z
+ 1 2 3
+ 2 3 1
+ 3 2 1
+ 1 1 3
+ 2 1 2
+ 3 2 3
+ 2 1 1
# you did not tell us the class of your data, assuming data.frame
df-read.table(textConnection(xx),header=T,colClasses=factor)
# a clean way to do what you want is using factors with ?levels
# (note that
I'd compute this in the log-scale (taking also advantage of the 'log'
and 'log.p' arguments of dnorm() and pnorm(), respectively), and then
transform back, e.g.,
fn1 - function(B){
-(pnorm(B) * dnorm(B) * B + dnorm(B)^2)/pnorm(B)^2
}
fn2 - function(B){
p1 - dnorm(B, log = TRUE) +
?missing
On 7/2/06, Jonathan Greenberg [EMAIL PROTECTED] wrote:
I'm a bit new to writing R functions and I was wondering what the best
practice for having optional variables in a function is, and how to test
for optional and non-optional variables? e.g. if I have the following
function:
Dear Rusers,
My question is about recode variables. First, i'd like to say
something about the idea of recoding:
My dataset have three variables:type,soiltem and airtem,which means
grass type, soil temperature and air temperature. As we all known, the
change of air temperature is greater than
Dear R-Help list:
I'm using the Matrix library to operate on 600 X ~5000 element
unsymmetrical sparse arrays. So far, so good, but if I find I need more
speed or functionality, how hard would it be to utilize other sparse
matrix toolsets from within R, say MUMPS, PARDISO or UMFPACK, that do
Thomas Preuth wrote:
Hello,
I use an imported dataframe and want to extract the mean value for one
column.
after typing mean (rae.df$VOL_DEP) I receive
[1] NA
Warning message:
Argument ist weder numerisch noch boolesch: gebe NA zurück in:
mean.default(rae.df$POINT_Y_CH)
Well,
Matthias Braeunig wrote:
It has to be a simple thing, but I could not figure it out:
How do I send the text output from object x to the printer?
As a shell user I would expect a pipe to the printer... |kprinter or
|lpr -Pmyprinter somehow. And yes, I'm on Linux.
I think capture.output()
Joris De Wolf a écrit :
Have you tried to define 'an' as a group? Like in
gls(IKAfox~an,correlation=corExp(2071,form=~x+y|an,nugget=1.22),data=renliev)
A small data set might help to explain the problem.
Joris
Thanks. Seems to work with a small artificial data set:
Hi, I need to analyze data that has 3.5 million observations and
about 60 variables and I was planning on using R to do this but
I can't even seem to read in the data. It just freezes and ties
up the whole system -- and this is on a Linux box purchased about
6 months ago on a dual-processor PC
Well, as a newbee, I believe your idea is great. However, the R Core team is,
in my humble opinion, way too stretched (for a free software development team)
to do this. A complementary development team (similar to, say, the Tinn-R team)
might be able to address this issue. I wish I would have
probably ?cut() is what you're looking for, e.g., something like:
ind - cut(mydata$soiltem, seq(0, 60, 0.2), labels = FALSE)
seq(0.1, 60, 0.2)[ind]
I hope it helps.
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of
Jennifer,
it sounds like that's too much data for R to hold in your computer's
RAM. You should give serious consideration as to whether you need all
those data for the models that you're fitting, and if so, whether you
need to do them all at once. If not, think about pre-processing
steps, using
Dear friends,
In s-plus, lm() generates the the studentized residuals
automatically for us, and In R, it seems don't have the results: After
i fitted lm(), i use attibutes() to see the objects and didn't find
studentized residuals .
How to get the the studentized residuals in lm(),have i missed
Hello Jennifer,
I'm writing a package SQLiteDF for Google SOC2006, under the
supervision of Prof. Bates Prof. Riley. Basically, it stores data
frame into sqlite databases (i.e. in a file) and aims to be
transparently accessible to R using the same operators for ordinary
data frames.
Right now,
Hi,
I'm new at this, I'm very confused, and I think I'm missing something
important here. In our pet example we have this:
fm - lme(Orthodont)
plot(Orthodont)
plot(augPred(fm, level = 0:1))
which gives us a trellis plot with the females above the males,
starting with F03, F04, F11, F06,
help.search(studentized)
You will see:
studres(MASS) Extract Studentized Residuals from a Linear Model
2006/7/3, zhijie zhang [EMAIL PROTECTED]:
Dear friends,
In s-plus, lm() generates the the studentized residuals
automatically for us, and In R, it seems don't have the results:
I always use recode function (in the car packages) to recode
variables.That works well and I like that function.
2006/7/2, zhijie zhang [EMAIL PROTECTED]:
Dear Rusers,
My question is about recode variables. First, i'd like to say
something about the idea of recoding:
My dataset have three
use doBy package will be more easy.
# GENERATE A TREATMENT GROUP #
group-as.factor(paste(treatment, rep(1:2, 4), sep = '_'));
# CREATE A SERIES OF RANDOM VALUES #
x-rnorm(length(group));
# CREATE A DATA FRAME TO COMBINE THE ABOVE TWO #
data-data.frame(group, x);
library(doBy)
If we have the data base of frauds given below
no. of frauds = variable
variable
-c(4,1,6,9,9,10,2,4,8,2,3,0,1,2,3,1,3,4,5,4,4,4,9,5,4,3,11,8,12,3,10,0,
7)
pmf - dpois(i, lambda, log = FALSE) # prob. mass function of variable
How to apply chi-square goodness of fit to test, Sample coming
Dear R-experts,
I am running a large simulation exercise where the enough complicated
integration is required.
The integral is computed within a C-function called Denom by use of function
qags from the gsl library.
Here is a piece of R-code:
23 matches
Mail list logo