Displaying 20 results from an estimated 1000 matches similar to: "help with binary outcome"
2011 Jun 14
1
problems with plots in loop (corrected Email)
Dear helpers,
In an attempt to use a loop to generate graphs in a for loop in run into
a problem. The plan is to fill each page with eight graphs (mfrow =
c(4,2)) in to two columns. Only the buttom graphs ( meaning every fourth
graph) have tick labels on the x axis to preserve space. I used an if
.... Else statement to achieve that.
The problem is that the first eight graphs are skipped
2008 Mar 27
2
strptime and plot(),lines()
Hello,
Im reading Data out of a Database.
#v+
rs <- dbGetQuery(con,"SELECT * ... )
attach(rs)
#v-
There ist a colum I convert into "Time".
#v+
> zeit<-strptime(datum,format="%Y-%m-%d %H:%M:%S");
> class(zeit)
[1] "POSIXt" "POSIXlt"
#v-
1.
A plot(zeit,money) plots the Data.
All i see on the x-achis are the Days.
I would like to see the
2007 Oct 16
1
library(car): Anova and repeated measures without between subjects factors
Hi,
sorry if this is explained somewhere but I didn't find anything.
How can I use "Anova" from the car package to test a modell without
between subject's factors? Suppose I have the following data
mat.1 mat.2 mat.3 di ex
1 85 85 88 1 1
2 90 92 93 1 1
3 97 97 94 1 1
4 80 82 83 1 1
5 91 92 91 1 1
6 83 83
2011 Jun 14
0
problems with plots in loop
Dear helpers,
In an attempt to use a loop to generate graphs in a for loop in run into
a problem. The plan is to fill each page with eight graphs (mfrow =
c(4,2)) in to two columns. Only the buttom graphs ( meaning every fourth
graph) have tick labels on the x axis to preserve space. I used an if
.... Else statement to achieve that.
The problem is that the first eight graphs are skipped
2009 Feb 05
2
The 'dbox' Format
I'd like to give the dbox format a try, but I could not find any information on how to enable it. There's information on how to set mail_location for the Maildir and mbox formats in the wiki and also in the commented configuration file, but how to set it for dbox is strangely missing. I took a guess with 'mail_location = dbox:~/dbox', but that didn't work, so it's probably
2007 Apr 25
2
form_remote_for, reloaded
Hi,
being relativly new to RoR, I''m having a problem which I found described
in this forum and somewhere else - but with no solution. I know, that it
may be bad to mix table and form tags, but the first solution of an in
place editing within a table looked nice:
Version using form_for:
<tr>
<%form_for :time_record, :url => { :action => "add_time_record" } do
2004 Jul 03
0
[Bug 1502] New: rsync error: error in rsync protocol data stream (code 12) at io.c(836)
https://bugzilla.samba.org/show_bug.cgi?id=1502
Summary: rsync error: error in rsync protocol data stream (code
12) at io.c(836)
Product: rsync
Version: 2.6.2
Platform: x86
OS/Version: Linux
Status: NEW
Severity: blocker
Priority: P3
Component: core
AssignedTo: wayned@samba.org
2008 Jul 09
1
netCDF to TIFF
Greetings R users!
I am working with the ENSEMBLE climate data (10 min resolution daily
temperatures images for all of Europe 1950-2006). The data comes
packaged in a single netCDF file. I would like to read the data in and
export a subset (2002-2006) as geotiffs (one image per day). So far, I
can successfully read in the data and view the images within an R
display window. However, I have yet to
2023 Nov 03
2
I need to create new variables based on two numeric variables and one dichotomize conditional category variables.
Just a minor point in the suggested solution:
df$LAP <- with(df, ifelse(G=='male', (WC-65)*TG, (WC-58)*TG))
since WC and TG are not conditional, would this be a slight improvement?
df$LAP <- with(df, TG*(WC - ifelse(G=='male', 65, 58)))
-----Original Message-----
From: R-help <r-help-bounces at r-project.org> On Behalf Of Jorgen Harmse via
R-help
Sent: Friday,
2009 Sep 19
1
Re-order columns
Dear R'sians,
Would really appreciate if you could suggest a more efficient way to order
the columns of a dataset. The column names of the dataset contain indices
separated by a period. Following are examples of my code and the dataset.
oC <- function(tg=x2) {
lth <- length(grep("T",names(tg)))
thix <-
2023 Nov 04
2
I need to create new variables based on two numeric variables and one dichotomize conditional category variables.
I might have factored the gender.
I'm not sure it would in any way be quicker. But might be to some extent
easier to develop variations of. And is sort of what factors should be
doing...
# make dummy data
gender <- c("Male", "Female", "Male", "Female")
WC <- c(70,60,75,65)
TG <- c(0.9, 1.1, 1.2, 1.0)
myDf <- data.frame( gender, WC, TG )
#
2012 Jul 08
1
Grouped regression
Hi,
I am a very occasional user of R, and will be grateful for some help in
constructing a regression across groups.
Here is an example:
library(MASS)
attach(cats)
Sex[120:144]<-factor(TG) #Renaming some males to transgender, to create 3
groups, male, female and transgender
out<-lm(Bwt~Sex/Hwt) #Gives me 3 separate linear regressions for groups M,
F and TG
What I now want to do
2023 Nov 03
1
[EXTERNAL] RE: I need to create new variables based on two numeric variables and one dichotomize conditional category variables.
Yes, that will halve the number of multiplications.
If you?re looking for such optimisations then you can also consider ifelse(G=='male', 65L, 58L). That will definitely use less time & memory if WC is integer, but the trade-offs are more complicated if WC is floating point.
Regards,
Jorgen Harmse.
From: avi.e.gross at gmail.com <avi.e.gross at gmail.com>
Date: Friday,
2023 Nov 03
1
I need to create new variables based on two numeric variables and one dichotomize conditional category variables.
df$LAP <- with(df, ifelse(G=='male', (WC-65)*TG, (WC-58)*TG))
That will do both calculations and merge the two vectors appropriately. It will use extra memory, but it should be much faster than a 'for' loop.
Regards,
Jorgen Harmse.
------------------------------
Message: 8
Date: Fri, 3 Nov 2023 11:10:49 +1030
From: "Md. Kamruzzaman" <mkzaman.m at gmail.com>
2023 Nov 03
1
I need to create new variables based on two numeric variables and one dichotomize conditional category variables.
Well, something like:
LAP <- ifelse(gender =='male', (WC-65)*TG, (WC-58)*TG)
The exact code depends on whether your variables are in a data frame or
list or whatever, which you failed to specify. If so, ?with may be useful.
Cheers,
Bert
On Fri, Nov 3, 2023 at 3:43?AM Md. Kamruzzaman <mkzaman.m at gmail.com> wrote:
> Hello Everyone,
> I have three variables: Waist
2014 Jan 27
4
Perl Search::Xapian
Hi,
Trying to learn Search::Xapian and be better at perl at the same time,
I'm stuck, at the DB_CREATE_OR_OPEN error. Perl says this:
~/dev/sandbox/Xapian-perl$ ./Index1-Xap.pl 100-objects-v1.csv db
"db" is not exported by the Search::Xapian module
Can't continue after import errors at ./Index1-Xap.pl line 7.
BEGIN failed--compilation aborted at ./Index1-Xap.pl line 7.
What I
2012 Jun 07
0
Bug#676569: gcc-4.7: -nostdlib broken, multiarch library path always added
Package: gcc-4.7
Version: 4.7.0-12
Severity: serious
Justification: breaks unrelated software
The following scenario is broken: I would expect the link to fail.
This is a carefully nailed-down testcase to figure out that the
fault is with gcc not binutils.
tg at zigo:~ $ echo 'int login_tty(int); void _exit(int); void _start() { _exit(login_tty(0)); }' >test.c
tg at zigo:~ $ rm -f
2023 Nov 05
1
I need to create new variables based on two numeric variables and one dichotomize conditional category variables.
There are many techniques Callum and yours is an interesting twist I had not considered.
Yes, you can specify what integer a factor uses to represent things but not what I meant. Of course your trick does not work for some other forms of data like real numbers in double format. There is a cost to converting a column to a factor that is recouped best if it speeds things up multiple times.
The
2005 Feb 24
2
a question about function eval()
Hi,
I have a question about the usage of eval(). Wonder if any experienced user can help me out of it.
I use eval() in the following function:
semireg.pwl <- function(coef.s=rnorm(1),coef.a=rnorm(1),knots.pos=knots.x,knots.ini.val=knots.val){
knotn <- length(knots.pos)
def.par.env <- sys.frame(1)
print(def.par.env)
print(environment(coef.s))
tg <- eval( (parse(text=
2011 Jan 28
2
klibc 1.5.21-1 and mksh
tags 516774 = patch
tags 516294 = upstream
thanks
Hi!
Please find attached a diff closing #516774 by adding mkstemp(3),
again with a minimalistic pseudo-arc4random(3) behind it. I?ve
revisited the code. An mkstemp testsuite from the ?net shows it
works, except for not caring how many ?X?en are in the template.
Addressing #516294, it allows compiling and linking an mksh from
today?s CVS against