Displaying 20 results from an estimated 5000 matches similar to: "Difficulty Replacing a Row of a Data Frame"
2008 May 29
7
How do you exit a function in R?
For example, based on a certain condition, I may want to exit my code early:
# Are there the same number of assets in "prices" and
"positions"?
if (nAssetPositions != nAssetPrices) {
cat("Different number of assets! \n\n")
<exit function>
}
I have searched, but not
2017 Oct 09
1
Using response variable in interaction as explanatory variable in glm crashes R
>>>>> Jan van der Laan <rhelp at eoos.dds.nl>
>>>>> on Fri, 6 Oct 2017 12:13:39 +0200 writes:
> It is actually model.matrix that crashes, not glm. Same
> crash occurs with e.g. lm.
> model.matrix(dob_mon ~ dob_day*dob_mon, data = tab)
> also crashes R.
Yes, segmentation fault.
It only happens when these are *logical*
2008 Jul 21
1
y-axis number format on plot, barplot etc.
I am trying to change the number format shown on the y-axis from scientific
5e05, to 500,000 etc. Does anyone know how to do this?
Is there something I can add as an argument to barplot, or would it be
through par?
barplot(data$Value, names.arg = as.vector(data$Field), main=strTitle)
[[alternative HTML version deleted]]
2008 Sep 05
1
Using R to generate reports
Hi all,
I would like to generate nicely formatted reports on a daily basis. The
reports would be a combination of charts and tables, generated in an
environment such as R.
Ideally, this would be an automated process. Does anyone know if this is
feasible, and how I could achieve well formatted reports? One idea would be
to have R scripts process the data/generate the charts and then use
2017 Jun 21
1
fitting cosine curve
Using a more stable nonlinear modeling tool will also help, but key is to get
the periodicity right.
y=c(16.82, 16.72, 16.63, 16.47, 16.84, 16.25, 16.15, 16.83, 17.41, 17.67,
17.62, 17.81, 17.91, 17.85, 17.70, 17.67, 17.45, 17.58, 16.99, 17.10)
t=c(7, 37, 58, 79, 96, 110, 114, 127, 146, 156, 161, 169, 176, 182,
190, 197, 209, 218, 232, 240)
lidata <- data.frame(y=y, t=t)
#I use the
2009 Oct 26
1
[LLVMdev] RegAllocSimple doesn't work
I tried both the most recent version of "simple" register allocation and
the one from last August, and neither seems to work correctly (they run,
but produce bad output). I used them to compile an old version of the
Unix "replace" utility (source code attached). Here's how I created the
executable:
llvm-gcc -emit-llvm -O0 -c replace.c -o replace.bc
opt -mem2reg
2017 Oct 06
2
Using response variable in interaction as explanatory variable in glm crashes R
The following code crashes R (I know I shouldn't try to estimate such a
model; this was a bug in some code of mine). I also tried with R-devel;
same result.
tab <- structure(list(dob_day = c(FALSE, FALSE, FALSE, FALSE, TRUE,
TRUE, TRUE, TRUE), dob_mon = c(FALSE, FALSE, TRUE, TRUE, FALSE,
FALSE, TRUE, TRUE), dob_year = c(FALSE, TRUE, FALSE, TRUE, FALSE,
TRUE, FALSE, TRUE), n =
2002 May 13
3
Histograms rotated, side-by-side
Hi there,
I am wanting to create 8 side-by-side histograms which have been rotated 90
degrees clockwise from how they usually sit.. all with the same scales. Is
someone able to help me out?
Thanks so much,
Rachel Cunliffe
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send
2016 Sep 22
1
Centos doesn't load or work
I've tried Zorrin, Ubuntu and Centos.
Zorrin and Ubuntu work fine, but Centos doesn't load, or run.
I asked for advice, didn't get any and seem to have been added to all your Centos mailing lists.
Please remove me from your mailing lists.
Sincerely,
Bob Cunliffe
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2001 Aug 12
1
Creating a Model Matrix - keeping NAs
I am wanting to create a model matrix and keep the NAs.
stratmat <- model.matrix(myformula,mydata)
Is there any way to do this? model.matrix doesn't have na.action as a
parameter. Elsewhere I have made use of na.keep <- function(x){x}.
Many thanks,
Rachel Cunliffe
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2017 Jun 21
1
fitting cosine curve
If you know the period and want to fit phase and amplitude, this is
equivalent to fitting a * sin + b * cos
> >>> > I don't know how to set the approximate starting values.
I'm not sure what you meant by that, but I suspect it's related to
phase and amplitude.
> >>> > Besides, does the method work for sine curve as well?
sin is the same as cos with
2009 Oct 22
0
[LLVMdev] request for help writing a register allocator
Hi Susan,
> But this doesn't seem to be happening; the stores to memory are there but
> the loads are not.
>
> Any ideas what's going wrong?
Are you using VirtRegMap::addSpillPoint and VirtRegMap::addRestorePoint ? If
not you may need to add calls to them to let the rewriter know where to
insert the loads/stores.
> If not, any advice on how to generate the loads
2017 Jun 21
0
fitting cosine curve
I'm trying the different parameters, but don't know what the error is:
Error in nlsModel(formula, mf, start, wts) :
singular gradient matrix at initial parameter estimates
Thanks for any suggestions.
On Tue, Jun 20, 2017 at 7:37 PM, Don Cohen <don-r-help at isis.cs3-inc.com>
wrote:
>
> If you know the period and want to fit phase and amplitude, this is
> equivalent to
2001 Aug 09
2
Pulling columns out of a data.frame
Hi there
Probably a very simple solution to this problem.
I have a character vector eg c("name1","name2","name3") and I want to pull
out these columns from a data.frame, converting each of these columns into
factors also.
Many thanks
Rachel
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2009 Oct 22
4
[LLVMdev] request for help writing a register allocator
I found the problem! My generated code is spilling correctly but is not
reloading at all. For example, if the original code has the equivalent of
this (where %1024 is a virtual reg):
%1024 = xxx
...
yyy = %1024
and I find no physical register for %1024, then I assign it to physical
register %edi and to a stackslot. That creates code like this:
%edi = xxx
store from %edi to the
2001 Feb 28
1
windows() options
Hi
Just noticed that the windows() function doesn't seem to allow for decimals
in the width and height options. For example, typing:
> windows(5,4,10)
> windows(5.2,4,10)
> windows(5.4,4.3,10)
produces three equally sized windows. Is there a way to get around this and
create more accurately sized windows without having to resize by hand?
Thanks
Rachel Cunliffe
Department of
2011 Jan 14
6
Plexus UPS on a QNAP NAS
Hi,
Has anyone managed to get a Plexus UPS talking to their NAS. I've followed
the excellent instructions here http://forum.qnap.com/viewtopic.php?f=182
<http://forum.qnap.com/viewtopic.php?f=182&t=35970&start=0> &t=35970&start=0
but I'm not there yet.
When I manually start upsdrvctl without the UPS plugged in I get
[~] # /usr/bin/upsdrvctl start
Network UPS
2003 Jul 25
1
Difficulty replacing NAs using Hmisc aregImpute and Impute
Hello R experts
I am using Hmisc aregImpute and Impute (following example on page 105 of The
Hmisc and Design Libraries).
*My end goal is to have NAs physically replaced in my dataframe. I have
read the help pages and example in above sited pdf file, but to no avail.
Here is example of what I did.
Ph, my data frame, is attached.
> xt <- aregImpute (~ q5 + q22rev02 + q28a, n.impute=10,
2004 Jul 07
0
jailutils security issue, and possible issue with 'jail'
Since some of you use the jailutils package, I just wanted to post some
additional info on the recent 'security fix' and also highlight a
possible issue with the 'jail' command.
http://memberwebs.com/nielsen/freebsd/jails/jailutils/security.html
It's not a very big issue (unless I'm missing something), simply one of
leaking the host environment into the jail.
This
2008 Jul 21
2
Output Nicely formatted tables from R
Hi there,
I've spent a while searching for ways of outputting table data from R in
presentable formats, such as colored backgrounds for column headings, bold
fonts etc. It appears that this is not possible, but I would be interested
to learn if in fact there was a way of achieving this.
Many thanks!
[[alternative HTML version deleted]]