Displaying 20 results from an estimated 300 matches similar to: "Array"
2009 Apr 22
1
Count Code
Hi there,
I am interested in converting SAS code to R & I wondered if anyone had
any quick R code/tips for the following piece of test SAS code?
Any feedback greatly appreciated.
data A1;
set A1;
count + 1;
by subject_id;
if first.subject_id then count = 1;
run;
[[alternative HTML version deleted]]
2009 Apr 27
1
For Loop Syntax
Hi there,
Just wondering if someone can help me with the correct syntax to use
with for loops?
I have split my original file by count, & wish to first of all assign
new tables based on the splits. Then I just want to create a new
variable. Please see code below.
This code works outside of a loop so I am just trying to code so I don't
have to repeat numerous times.
Many
2009 Apr 23
3
Running Edit() or Fix() on Linux Machine
Hi all,
As I am new to using R on a Linux machine I have another question if
that's ok.
I am trying to use the fix() or edit() function on this Linux machine
but I get the following error message:
Error in dataentry(datalist, modes) : invalid device
In addition: Warning message:
In edit.data.frame(get(subx,envir=parent),title = subx, ...) :
Unable to create fontset
2009 Apr 23
3
Running Scripting on Linux Machine
Hi all,
I am new to using R on a Linux machine & I have a few questions on
set-up. If anyone has experience in this area any advice would be
greatly appreciated.
- When I open R I have the option to do the following:
o 'Run in Terminal'
o 'Display'
o 'Cancel'
o 'Run'
- My only option to open a window such as we find in
2004 Aug 15
3
Stacking Vectors/Dataframes
Hello,
Is there a simple way of stacking/merging two dataframes in R? I want to
stack them piece-wise, not simply add one whole dataframe to the bottom of
the other. I want to create as follows:
x.frame:
aX1 bX1 cX1 ... zX1
aX2 bX2 cX2 ... zX2
... ... ... ... ...
aX99 bX99 cX99 ... zX99
y.frame:
aY1 bY1 cY1 ... zY1
aY2 bY2 cY2 ... zY2
... ... ... ... ...
aY99 bY99 cY99 ...
2003 Jun 17
1
probability values ?
Hello
I try to find probability values of some predictor combinations using
logistic reg. in response level.
Firstly I found coefficients by glm function.
Then I followed two ways to get probability values:
1- probility <- exp(X0+bX1+cX2+...)/((1+exp(X0+bX1+cX2+...))
2- probility <- predict(glm.obj,type="resp")
Should have these two given same result ?
if so, I did not have. Why
2009 Jul 30
2
weight median by count for multiple records
Hello everyone,
I have a .csv file with the following format:
uniqueID SubjectID Distance_miles Tag
1 1001 5.5 3
2 1001 7 1
3 1001 6.5 1
4 1001 5 1
5 1002
2009 Jan 25
1
Multiple lattice plots on a page: aligning x-axes vertically
Dear R-help,
I am creating a two lattice plots (a densityplot() and xyplot()) that
have the same x-axes and then 'printing' them onto the same page, one
above the other (see end of email for an example to generate the graph).
With different labels on the y-axis for each plot the left spacing is
different, and the x-axes don't align vertically. Although I can
manually modify the
2009 Jan 27
1
Creating list or numeric vectors out of selected columns of row oriented data
I am just assuming this can be done, but I have not gotten close to
making it happen. I have a data file with about 1 million rows with
1470 unique subjects. Each row represents a small set of observations
made on a specific date for a single subject. I would like to
transform the data so that I have an R object with a single entry for
each subject and start date and vectors for the
2008 Nov 20
2
Calculating SD according to groups of rows
*Hi all,
I know this is probably basic, but I have proven to be a slow learner in any
programming language. Anyhow,
how can I calculate the SD for each person in my table? I have two patients
in this R data.frame, 7200 and 23955.
I extracted this from a relational database, but am I better off attempting
to compute SD in SQL, or is this easily accomplished in R?
* SUBJECT_ID HR
1
2012 Aug 07
1
lm with a single X and step with several Xi-s, beta coef. quite different:
Hi, (R version 2.15.0)
I am running a pgm with 1 response (earlier standardized Y) and 44
independent vars (Xi) from the same data =a2:
When I run the 'lm' function on single Xi at a time, the beta
coefficient for let's say X1 is = -0.08 (se=0.03256)
But when I run the same Y with 44 Xi-s with the 'step' function (because
I left direction parameter empty, I assume a backward
2009 Sep 23
2
collection_text onchange event
hi,
I want to display a drop down list and when i select some option from
the drop down list i want to display all the records under that selected
category in the "SAME PAGE"..
eg ..
<%= collection_select(:question,:subject_id ,@subject, :id, :name) %>
when i choose a subject i should, display all the questions under that
subject in the same page.I am new to rails.Can
2000 Mar 18
1
Corstr in the Gee (Generalized Estimation Equation) arguments?
Dear all:
Y=a+bX1+cX2
In the Gee (Generalized Estimation Equation) arguments:
The arument Corstr has sveral choices:
"independence" "fixed" "stat_M_dep" "non_stat_M_dep"
"exchangeable" "AR-M" "unstructured"
What does each term mean?
How do I choose among them?
How do I know the correlation structure of
2005 Jun 14
1
Puzzled in utilising summary.lm() to obtain Var(x)
I have a program which is doing a few thousand runs of lm(). Suppose
it is a simple model
y = a + bx1 + cx2 + e
I have the R object "d" where
d <- summary(lm(y ~ x1 + x2))
I would like to obtain Var(x2) out of "d". How might I do it?
I can, of course, always do sd(x2). But it would be much more
convenient if I could snoop around the contents of summary.lm and
2005 Apr 26
1
Error in nonlinear mixed-effects model
Dear all,
I am trying to fit a mixed-effects non linear regression, but I have some trouble with it. My data are a balanced panel of 904 subjects with 8 observations (at regular periods) per subject.
The functional form of my model is Y=Aexp(-BX1)X2 +e. I want to allow parameters A and B to vary among subjects and also include an autocorrelation term. I have already fitted a standard nonlinear
2007 Nov 29
1
relative importance of predictors
Hei Group,
I want to compare the relative importance of predictors in a multiple
linear regression y~a+bx1+cx2...
However, bptest indicates heteroskedasticity of my model. I therefore
perform a robust regression (rlm), in combination with bootstrapping (as
outlined in J. Fox, Bootstrapping Regression Models).
Now I want to compare the relative importance of my predictors. Can I rely
on the
2004 Nov 05
1
R usage -- for article
Hello all,
I write a decision-support column for a computing magazine,
Intelligent Enterprise. In my next column, I'll be revisiting a topic I
wrote on 3 years ago, open-source analytical software. R is perhaps the
most successful open-source analytical package.
I'd like to hear from users, especially those who chose R for some
other reason than that it's free, about what
2004 Oct 28
1
gsub() on Matrix
Hi,
Suppose I've got a matrix, and the first few elements look like
"x1 + x3 + x4 + x5 + x1:x3 + x1:x4"
"x1 + x2 + x3 + x5 + x1:x2 + x1:x5"
"x1 + x3 + x4 + x5 + x1:x3 + x1:x5"
and so on (have got terms from x1 ~ x14).
If I want to replace all the x1 with i7, all x2 with i14, all x3 with i13,
for example. Is there an easy way?
I tried to put what I want
2003 Feb 10
2
Apple shares?
Hi,
I have a need to do some file transfers between my AIX 4.3.3 boxes and Apple
PC's. I use SAMBA to provide shares to PC's, but I know nothing about Apple.
FTP is an option, but less desirable than setting up a share. Does anyone
have experience with using SAMBA to set up shares with Apple clients?
I know that there are, other products to accomplish what I ask, but in terms
of support
2002 Oct 29
2
Selective blocking of password authentication
I'm running OpenSSH 3.4 and have the situation that some users want to
allow password authentication into their accounts and some explicitly
want to disallow password authentication. Is this possible? I wasn't
able to come up with a way looking through ssh_config and sshd_config,
as well as some FAQs.
It seems the problem is that there is no scoping of directives in sshd_config,
thus