Displaying 20 results from an estimated 5000 matches similar to: "access to 'formula' terms in a user function"
2006 Dec 08
2
trouble with cloud output to bmp when in loop
I have some data that I need to view in various 3-D clouds. To better see
the cloud structure on a 2-D screen I would like to output a bunch of bmp
files with clouds at slightly different angles, then run them through an
external program to animate them. But I'm having trouble getting cloud()
from the lattice package to output to bmp files. Oddly, this is only a
problem when outputting
2005 Aug 17
1
RODBC and sqlColumns
I have a Postgres database that I am connecting to with the Postgres
ODBC driver on Windows XP in R 2.1.0. In the database is a database
with two schemas (public and X). With RODBC (1.1-4) , I can connect to
the database and get the tables with sqlTables(db). I can query tables
in the schema with sqlQuery("SELECT * FROM X.test"). However, I can't
get the columns in table X.test
2003 Jan 21
2
newbie: data frame to vector
Sorry, but I'm very new to R. I'm trying to figure out how to convert a
column from a data frame to a vector. More specifically, I have read in a
comma separated value table which contains a number of variables in columns,
plots in rows...
t <- read.table("G:/R/table1.txt", sep=",", header=TRUE)
the data comes in just fine. Now I want to do an XY plot of 2
2006 Nov 29
1
control for frame color in cloud()
I am trying to construct a cloud plot viewable in 3D with the classic 3D
glasses (one red lens, one bluish lens). I've figured out how to overlay
two printings of cloud() (from the lattice package) with appropriate colors,
however the box frame seems to only print in black. Is there any way to
control the color for the frame? How about the background color (gray)?
See
2010 Jan 13
1
Formula for normal distribution with know mean and standard error and n terms
Hello,
I am searching for a method to calculate a normal distribution.
For example this equation is used to calculate the normal curve when the
mean and standard deviation are know.
p(x) = (1/?*sqrt(2?)) x exp (- (x-?)2/2?2)
or
(Embedded image moved to file: pic27350.jpg)Normal Probability Distribution
Formula
However, some of the literature I'm reading (I'm building an ecological
2007 Jun 29
0
GAM for censored data? (survival analysis)
First let me admit that I am no statistician... rather, an ecologist with
just enough statistical knowledge to be dangerous.
I've got a dataset with percent ground cover values for species and other
entities. The data are left censored at zero, in that percent ground cover
cannot be negative. (My data rarely reach 100% cover so I haven't bothered
with adding a right censoring at 100).
2004 Aug 25
0
Censored (Tobit) Regression method
I need to give a quick description of Tobit Regression (TR), including how
it differs from ordinary least squares (OLS). I am an ecologist who knows
just enough about remote sensing and statistics to be dangerous in both.
Now I have found myself doing a remote sensing project where I have used TR:
survreg(Surv()). As far as I can tell, no form of Censored Regression has
been used in analyzing
2009 Nov 29
1
Convergence problem with zeroinfl() and hurdle() when interaction term added
Hello,
I have a data frame with 1425 observations, 539 of which are zeros. I
am trying to fit the following ZINB:
f3<-formula(Nbr_Abs~ Zone * Year + Source)
ZINB2<-zeroinfl(f3, dist="negbin", link= "logit", data=TheData,
offset=log(trans.area), trace=TRUE)
Zone is a factor with 4 levels, Year a factor with 27 levels, and
Source a factor with 3 levels. Nbr_Abs is counts
2009 Jul 03
1
The time series analysis functions/packages don't seem to like my data
I have hundreds of megabytes of price data time series, and perl
scripts that extract it to tab delimited files (I have C++ programs
that must analyse this data too, so I get Perl to extract it rather
than have multiple connections to the DB).
I can read the data into an R object without any problems.
thedata = read.csv("K:\\Work\\SignalTest\\BP.csv", sep = "\t", header
=
2018 Jan 24
4
Geometry delaunayn and deldir results, differing results from Octave due to decimal precision?
The problem:
I would like to translate the Octave algorithm in griddata.m to R.
Within the griddata algorithm calls are made to the Delaunay function. For the R translation I have found delaunayn within the "geometry" package and also the deldir package.
Both do similar things but give slightly different results depending on the input.
The question is, what is making the results for the
2009 Apr 28
1
[macosx] improving quartz & Aqua Tk behaviour outside of RGui
Hello,
On Mac OS X, certain Aqua/Quartz UI functionality requires an
application to be launched from within an app bundle, or
(alternatively) requires a Carbon application with a resource fork.
Playing with the wxWidgets distribution, I discovered that it is quite
easy and transparent to make such a Carbon app from (I guess) any
command line application. When applied to the R executable called
2009 Apr 28
1
[macosx] improving quartz & Aqua Tk behaviour outside of RGui
Hello,
On Mac OS X, certain Aqua/Quartz UI functionality requires an
application to be launched from within an app bundle, or
(alternatively) requires a Carbon application with a resource fork.
Playing with the wxWidgets distribution, I discovered that it is quite
easy and transparent to make such a Carbon app from (I guess) any
command line application. When applied to the R executable called
2007 Jul 20
1
Column-mean-values for targeted rows
Hi all,
I'm handling massive data.frames and matrices in R (30000 x 400).
In the 1st column, say, I have 0s and 1s indicating rows that matter; other columns have probability values.
One simple task I would like to do would be to get the column mean values for signaled rows (the ones with 1)
As a very fresh "programmer" I have build a simple function in R which should not be very
2006 Mar 11
2
how to create analog stripchart plots of x vs t (t=mm/dd/yyyy hh:mm:ss)
Hello r-experts,
I sure could us a little help.
I have an ever updating text file with timestamped data in it. I can
reformat in anyway I want if need be but currently I have chosen to make
columns of date, time and measuresed value (comma delimeted and with the
dates and times in quotes to interpret them as strings).
Here is a small section of my text data file:
2012 Jan 04
1
Adding a vertical line to plot with two overlapping density plots
Hi,
A simple question I hope. I wish to add a single vertical line to a plot
with several density plots.
Here is a simplified example.
############
thedata <- data.frame(x1=rnorm(100,1,1),x2=rnorm(100,3,1)) #create data
thedata.m<-melt(thedata)
densityplot(~value, thedata.m, groups=variable,auto.key=list(columns=2))
#this gives the two density plots
#########
what I wish now is to add a
2008 Jul 16
1
Problem with mpi.close.Rslaves()
I am running R 2.7.0 on a Suse 9.1 linux cluster with a job scheduler
dispatching jobs and openmpi-1.0.1. I have tried running one of the
examples at http://ace.acadiau.ca/math/ACMMaC/Rmpi/examples.html in Rmpi
and they seem to be working, except mpi.close.Rslaves() hangs. The
slaves are closed, but the master doesn't finish its script. Below is
the example script and the call to R. The job is
2008 Nov 07
1
Rmpi task-pull
Hi, I'm testing the efficiency of the Rmpi package regarding parallelization
using a cluster.
I've found and tried the task pull programming method, but even if it is
described as the best method, it seems to cause deadlock, anyone could help
me in using this method?
here is the code I've found and tried:
# Initialize MPI
library("Rmpi")
# Notice we just say "give us
2011 Oct 18
2
Non-linear maximization function in R
Hello,
# Full disclosure. I am not sure if my problem is a bug(s) in the code, or a
fundamental misunderstanding on my part about what I am trying to do with
these statistics. I am not familiar with maximum likelihood tests.
# I currently have two vectors
Aequipecten<-c(0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
2010 Aug 18
2
Different way of aggregating
Hi
Usually "aggregate" is used to calculate things such as the sum of all data
on the first day, the sum next day, and so on.
But how can I calculate the mean of the first hour of all days, the mean of
the second hour of all days, and so on. ???
That's
Most examples:
today at 1am + today at 2am + today at 3am +.... -> sum
today
tomorrow at 1am + tomorrow at
2018 Jan 24
0
Geometry delaunayn and deldir results, differing results from Octave due to decimal precision?
"The question is, what is making the results for the R packages different
from each other?"
There are literally thousands of R packages, contributed independently by
thousands of people. There should be no expectation of consistency or for
that matter, "correctness", among them. Caveat emptor.
Only within the base R distribution, maintained and mostly written by the R
Core