Displaying 20 results from an estimated 2000 matches similar to: "subsetting like in SAS"
2018 Mar 14
0
Fwd: the same function returning different values when called differently..
Hi Akshay,
(Please include r-help when replying)
You have learned that PFC.NS and snl[[159]] are not identical. Now you have
to figure out why they differ. This could also point to a bug or a logic
error in your program.
Figuring out how two objects differ can be a bit tricky, but with
experience it becomes easier. (Some others may even have some suggestions
for good ways to do it.)
Basically
2018 Jan 20
1
a vector unusually getting NA values.....
dear members,
I have a function by name "ygcudf" and a list of stock names by name"snl" ( of class "list"). ygcudf acts on snl and returns a list of the most favourable stocks. I don't wish to divulge the code of the function, for genuine reasons, but the algorithm is as follows:
{
k <- 1; i <- 1
2018 Mar 14
3
the same function returning different values when called differently..
dear members,
I have a function ygrpc which acts on the daily price increments of a stock. It returns the following values:
ygrpc(PFC.NS,"h")
[1] 2.149997 1.875000 0.750000 0.349991 2.100006 0.199997 4.000000 2.574996 0.500000 0.349999 1.500000 0.700001
[13] 0.500000 1.300003 0.449997 2.800003 2.724998 66.150002 0.550003 0.050003 1.224991 4.899994 1.375000
2010 Jan 09
2
aov function syntax
Hello,
I have a simple question about using the aov function syntax (ie. * + or :)
for the interaction of 2 factors. I have read the help files, and researched
other sites, and have included my source files. My goal is to measure the
signifigance of the interaction between population and condition (aka.
population:condition). I can't seem to figure it out.
1. In the first example the
2012 May 25
3
Multiple cbind according to filename
Hi all,
I'm just a beginner with R but I have not been able to search for any
relevant answer to my problem. I apologize if it has in fact been asked
before.
Recently I've realized that I need to combine hundreds of pairs of data
frames. The filenames of the frames I need to combine have unique strings.
This is my best guess as to the approach to take:
filenames<-list.files()
2010 Sep 13
2
How to tell R that "ABC" is the name of a dataset not a variable value
All,
For example, I have a dataset named "ABC" loaded into R
> ABC
[,1] [,2] [,3]
[1,] 1 4 7
[2,] 2 5 8
[3,] 3 6 9
and I also have a variable datasetname
> datasetname
[1] "ABC"
and I want to add this "ABC" dataset to an existing list "alldata"
> alldata <-NULL
> alldata <- as.list(alldata)
since I will
2009 Apr 10
1
Subset a data frame for plotting
Hello,
I have a question regarding how to subset/select parts of a data
frame (matrix) in order to plot data associated only with this subset.
Specifically I have a large data frame in which one column contains ID
values (dates), and other columns contain data I would like to plot
(temperature, light, etc.). I would like to break up this large matrix
so as to plot data associated
2009 Jun 12
2
Automate a data load and merge
Hi R list,
I would like to automate, or speed up the process from which I take
several separate datasets, stored in .csv formate, import and merge
them by a common variable. So far I have greatly sped up the loading
process but cannot think of a way to automate the merger of all
datasets into a common data.frame.
My apologies if this has been covered, any R search suggestions are
2008 Jul 09
4
Strptime/ date time classes
Dear all,
I've come across a problem using strptime, can anyone explain what's
going on? I'm using version 2.7.0 on Windows XP.
Thank you
Caroline
First read in a data file using read.table
alldata = read.table(file, header=F, skip=4, colClasses =
c("character","numeric"))
dim(alldata)
[1] 223960 2
# inefficient, safe way of sorting out missing or dodgy
2009 Sep 07
1
Omnibus test for main effects in the face of an interaction containing the main effects.
R 2.9.1
Windows XP
I am fitting a random effects ANOVA with two factors Group which has two levels and Time which has three levels:
fita<-lme(Post~Time+factor(Group)+factor(Group)*Time, random=~1|SS,data=blah$alldata)
I want to get the omnibus significance tests for each factor and the interaction. I believe I can get the omnibus test for the interaction by running the model:
2004 Sep 09
2
Handling the windows clipboard/32KB limit
(R 1.9.1; Windows 2000;)
I'm just comparing ease of use, speed, etc for methods of transferring data frames in the Excel, MySQL, R triangle. It turns out that going from Excel to R (when doing this carefully). Using the clipboard is actually quite fast and efficient (2 seconds for transferring 120 000 cells on a common desktop computer as compared to much longer for going the RODBC route,
2011 Apr 30
3
using tapply with multiple variables
HI All,
I have a long data file generated from a minimal pair test that I gave to
learners of Arabic before and after a phonetic training regime. For each of
thirty some subjects there are 800 rows of data, from each of 400 items at
pre and posttest. For each item the subject got correct, there is a 'C' in
the column 'Correct'. The line:
tapply(ALLDATA$Correct,
1999 Jan 20
1
Inherit names ...
No doubt an easy answer to this exists.
I have a data frame which comprises 4 matrices and 2 vectors:
year(1024,6),growth(1024,6),ycens(1024,6),gcens(1024,6),yinit(1024),ginit(1024)
The names of the 26 columns get denoted as y.1 to y.6, g.1 to g.6, yc.1 to
yc.6, gc.1 to gc.6, yi and gi as these are the internal names.
I wish to make a subset of the data using the logical vector R1(length
1024)
2012 Jun 19
1
Possible bug when using encomptest
Hello R-Help,
-----------------------------------------------------------------------------------------------------------------------------------------
Issues (there are 2):
1) Possible bug when using lmtest::encomptest() with a linear model
created using nlme::lmList()
2) Possible modification to lmtest::encomptest() to fix confusing fail
when models provided are, in fact, nested.
I have
2009 Jun 03
2
classification table in logistic regression
Prof. Harrell,
My name is Armida Carbajal, I'm a graduate student intern at Sandia National Laboratories (SNL) and am conducting some research for my thesis project at the University of New Mexico in Statistics for SNL.
My project entails a logistic regression and I wanted to create a classification table like the one found in SAS using the function CTABLE. I was running out of ideas on
2010 Oct 21
1
All other variables in upper scope arg for stepAIC
Hi - I am trying to substitute for "the_other_y" in the code below. I want
y2 and y3 to be there when i is 1, y1 and y3 to be there when i is 2 and y1
and y2 to be there when i is 3. I'm sure it's to do with what format the
data should be in and I've tried alldata[,-i], but it fits all the columns
of alldata except i rather than each column one at a time. I've tried
2010 Dec 10
1
WriteXLS error:Error in get(x, envir = envir) : variable names are limited to 256 bytes
Hello all,
I don't understand why this won't work. I have entered:
WriteXLS(alldata,'test.xls')
and I get this error message:
Error in get(x, envir = envir) : variable names are limited to 256 bytes.
My variable names are not very long, and are accepted by write.csv.
alldata is a list containing 4 dataframes, with each dataframe having the
the same variable names, which are:
2015 Jan 04
2
sys-kernel/gentoo-sources-3.17.7 - nouveau driver fails at system resume - nouveau E[ PGRAPH][0000:01:00.0] PGRAPH TLB flush idle timeout fail
Hello,
I'd like to bring to your attention a bug report[1] I have filed
on the Gentoo bugzilla about a regression (quite an old one) in
the nouveau driver.
If there is anything missing in the report that could help fixing
the problem, please feel free to ask.
[1] https://bugs.gentoo.org/show_bug.cgi?id=534038
--
Było mi bardzo miło. Twoje oczy lubią mnie
>Łukasz<
2008 Jun 27
1
xyplot and separate abline per plot
Hello list!
I have a set of data like this:
> alldata[1:5,]
breaks numbers disttype moltype type
1 0.0000000 6598 Gapped Distances 5S Between species
2 0.4066667 0 Gapped Distances 5S Between species
3 0.8133333 5228 Gapped Distances 5S Between species
4 1.2200000 0 Gapped Distances 5S Between species
5 1.6266667 9702 Gapped
2002 May 21
2
Unwanted Levels in R
I searched the mailing list archives and found one post relevant to my problem,
but it was not specific enough to solve my problem.
I am reading in a large file of data (I believe it is in ASCII format). I have tried
reading the file in as a data frame and as a list, and both methods result in
unwanted levels being created which leads to problems when I try to copy
or reference certain cells.