Displaying 20 results from an estimated 10000 matches similar to: ""regression" line of 2 independent variables"
2010 Mar 12
1
Exporting animation of a series of plots
Hi All,
Thank you in advance for your help.
I made an agent-based model in R and I plot it using image() each
timestep creating a nice animation. I can't seem to find in any of the
R codes a means to export the series of images so that they can be
played as a movie or animation.
Thank you again.
Flana
2013 Oct 07
1
Color font in verbatim text output in Shiny
Hello!
Is there any way to change the colors (and other characteristics) of the
font that is being used by Shiny when the ui.r code hase some
verbatimTextOutput?
For example, I am producing 2 outputs in two tabs.
mainPanel(
tabsetPanel(
tabPanel("Output 1", verbatimTextOutput("myoutput1")),
tabPanel("Output 2",
2012 Apr 30
1
Hmisc::pstamp, mfcol, and spacing
I am trying to make a nice 2x1 plot and add a timestamp with comment.
The pstamp function from Hmisc works nicely when mfcol=c(1,1),
but when mfcol=c(2,1), the stamp winds up in the wrong place:
> require('Hmisc')
> opar <- par(mfcol=c(2,1))
> plot(1:10)
> title(main="MAIN Title")
> plot(1:20)
> title(main="Another Title")
> pstamp("normal
2011 Jul 26
1
Optimal Code for subset of Integer Sets
Hi,
I wanted to know if there existed an good implementation in R of the
following classical subset Integers :
$P_{n,m} = {k_1, \ldots, k_m \in \mathbb{N} : k_1 + \ldots + k_m = n }$
for any integers $m < n$. There is an obvious not optimal code which would
be to run through $m$ sums and put a boolean condition to report if the
integers respect these condition but it would take $m^n$
2011 Oct 03
1
Matrix/Vector manipulation
Hi guys,
Have the following problem computing vectors with pure vector algebra and end up reverting to recursion or for-looping.
Function my_cumsum calculates a weighted average (W) of ratios (R), but only up to the given size/volume (v). Now I recurse into the vector (from left to right) with what you have left from the difference of volume minus current weight, and stop when the difference is
2010 Mar 02
2
plotting a subset of a time series
Dear R People:
I have the following time series and plot:
> x <- ts(rnorm(50),start=2005,freq=12)
> plot(x)
>
which works fine.
I would like to plot a subset of that time series, which I did with:
> plot(window(x,2005,2006.83))
Is there a better way to do this, please?
Thanks,
Erin
--
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
2011 Apr 25
1
R equivalent to (D)QDAWO in Fortran?
Hi useRs,
I have a set of fortran code that was passed down from previous students, and I am converting its algorithm into R codes.
I encounter this function in Fortran (D)QDAWO, which numerically integrates a function f with a user-specified cosine or sine weight. It is used because the original function that I want to integrate is f(x)*cos(x).
I tried in R to directly integrate by
2010 Aug 05
4
Reducing a list of functions by composition fails
Hi All,
I'd like to be able to specify the ordered composition of several
functions. So I defined compose:
compose <- function(f,g){
function(x){f(g(x))}
}
and some simple test functions:
plus2 <- function(x){x+2}
plus3 <- function(x){x+3}
plus4 <- function(x){x+4}
> (compose(plus2,compose(plus3,plus4)))(3)
[1] 12
Works fine. But trying to reduce a list of functions by
2011 Jan 19
1
Problem in using bdh function for Govt tickers
Hi, all
I wanted to fetch data from Bloomberg for govt bonds, and analyse it
further.
I am having trouble in getting data as when I use field=PX_LAST, it is
giving the prices but when I use field=CPN, or ISSUE_DT, it is not giving
the results and just bouncing back <NA> for that.
This is the piece of code:
> library(rJava)
Warning message:
package 'rJava' was built
2009 Aug 03
3
Help with reshaping data.frame
I'm having trouble reshaping a data.frame from long to wide.
(I think that's the right terminology; feel free to educate me.)
I've looked at the reshape function and package and plyr package,
but I can't quite figure out how to do this after a dozen variations.
I have a data.frame with more levels than this, but similar to:
> tst
K1 K2 K3 V1 V2 V3
1 10 D a 0.08 99
2012 Sep 05
2
using sqldf's read.csv.sql to read a file with "NA" for missing
I'm trying to use sqdf's function read.csv.sql to read CSV files in which the missing values are represented by NA's.
Plain old read.csv works fine on these files, but they are rather large and I'd like to filter using sql-like statements.
However, even if I specify field.types correctly and nrows=-1, it still turns the columns with NA's into chars or 0.
I'm trying to make
2011 Oct 02
2
getting list of data.frame names
Dear R People:
This is probably a very simple question. I know that if I want to get
a list of the classes of the objects in the workspace, I can do this:
> sapply(ls(), function(x)class(get(x)))
a a1.df b d
"list" "data.frame" "integer" "numeric"
Now I want to get just the data frames.
>
2009 Jun 24
1
how to undo automatic loading of packages?
I wanted to try out package distrMod, so I did
> install.packages('distrMod')
> library(distrMod)
and played around, saved and quit.
Now whenever I start up in this directory, I get distr and lots of other
stuff loaded and lots of messages.
How do I keep it from automatically loading, other than starting over in
another directory?
I read ?Startup, but I couldn't suss out
2009 Jul 21
1
Elementary Symmetric Polynomials
We are interested in obtaining an efficient function that for a given
vector of length t will output a vector of length t+1 that contains the
associated values of the elementary symmetric polynomials in t
variables. Below is what we have at the moment, but it is a little slow
for our needs. Any suggestions?
Thanks ahead of time for any help you can offer,
Austin H. Jones
Department of
2010 Aug 31
4
pasting together 2 character arrays
If possible I would like to combine two different character arrays in combinations
Array1 <- c("height","weight","age","sex")
Array2 <- c("trt0","trt1","trt2")
I would like to combine these two character vectors to end up with such ...
Array3
"height.trt0.trt1"
"height.trt0.trt2"
2011 Mar 24
4
Millisecond TimeStamps
I am wondering if there is a good way to work with data that is indexed in
time, via timestamps with a resolution in milliseconds. As I understand it,
the POSIX classes have a resolution i n terms of seconds, and will not
process fractional seconds from a string. Is this correct. I realize that
this may be a little unclear. Here is what I am trying to do:
A data frame with a time series
2009 Aug 20
5
help with regular expressions in R
I'm having trouble achieving the results I want using a regular expression.
I want to eliminate all characters that fall within square brackets as well
as the brackets themselves, returning an "". I'm not sure if it's R's use of
double slash escapes or something else that is tripping me up. If I only use
one slash I get
1: '\[' is an unrecognized escape in a
2013 Jun 20
0
C symbol name "psmirnov2x" not in load table
I'm working with some old code that worked under R 2.15.3 but gives an error under 3.0.0 and 3.0.1 :
> 1.0 - .C("psmirnov2x", p = as.double(10.0), as.integer(1000), as.integer(1000))$p
Error in .C("psmirnov2x", p = as.double(10), as.integer(1000), as.integer(1000)) :
C symbol name "psmirnov2x" not in load table
I don't understand why that function would
2005 May 18
2
FREE music for downloading
Need new Music on Hold for your PBX?
Signate is happy to make a variety of classical music selections available,
sampled at rates that are appropriate for telephony. There is no charge.
The selections feature Elena Kuschnerova, pianist, and Lev Guelbard, violinist,
playing public domain pieces that will give callers a classic impression of you
or your company . Click on the link to see a list
2005 Jan 12
2
?"=" (Windows) (PR#7504)
?"=", ?"==", ?"!=", ?">=", and ?"<=" sends me to the documentation for
?help on Windows, while returning the correct documentation on Linux.
Robert
> version
_
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 2
minor