Displaying 20 results from an estimated 200 matches similar to: "Problems with step function"
2008 May 13
1
R help: problems with step function
Dear List Members,
I have encountered two problems when using the step function to
select models. To better illustrate the problems, attached is an
R image which includes the objects needed to run the code attached.
lm.data.frame have factor variables with 3 levels.
The following run shows the first problem. AICs (* and **) are different.
I noticed that the Df for rs13482096:rs13483699 is 4,
2018 Apr 19
0
create multiple categorical variables in a data frame using a loop
Hello,
When programming it is better to use dat[["variable"]] than dat$variable.
So your code could be
pfas.pheno[[cat.var]] <- NA
pfas.pheno[[cat.var]][pfas.pheno[,i] <= quantile(pfas.pheno[,i],0.25,
na.rm =T)] <- 0
etc.
Untested.
Hope this helps,
Rui Barradas
On 4/19/2018 7:20 PM, Ding, Yuan Chun wrote:
> Hi All,
>
> I want to create a categorical variable,
2018 Apr 19
0
create multiple categorical variables in a data frame using a loop
> On Apr 19, 2018, at 11:20 AM, Ding, Yuan Chun <ycding at coh.org> wrote:
>
> Hi All,
>
> I want to create a categorical variable, cat.pfoa, in the file of pfas.pheno (a data frame) based on log2pfoa values. I can do it using the following code.
>
> pfas.pheno <-within(pfas.pheno, {cat.pfoa<-NA
> cat.pfoa[pfas.pheno$log2pfoa
2018 Apr 19
4
create multiple categorical variables in a data frame using a loop
Hi All,
I want to create a categorical variable, cat.pfoa, in the file of pfas.pheno (a data frame) based on log2pfoa values. I can do it using the following code.
pfas.pheno <-within(pfas.pheno, {cat.pfoa<-NA
cat.pfoa[pfas.pheno$log2pfoa <=quantile(pfas.pheno$log2pfoa,0.25, na.rm =T)]<-0
cat.pfoa[pfas.pheno$log2pfoa >=quantile(pfas.pheno$log2pfoa,0.75, na.rm =T)]<-2
2018 Apr 20
1
create multiple categorical variables in a data frame using a loop
> On Apr 19, 2018, at 1:22 PM, David Winsemius <dwinsemius at comcast.net> wrote:
>
>
>> On Apr 19, 2018, at 11:20 AM, Ding, Yuan Chun <ycding at coh.org> wrote:
>>
>> Hi All,
>>
>> I want to create a categorical variable, cat.pfoa, in the file of pfas.pheno (a data frame) based on log2pfoa values. I can do it using the following code.
2010 Sep 24
1
color of lines while printing through for loop
I am trying to find a convenient way to control line colors when
printing from a for loop using the lines command.
Right now I have solved this by creating a colors vector that is refered
to in the loop with index. However, the colors choosen here are just
1,2,3,4,5...
I would like to get colors from the col = rainbow(x) that you can use in
plot() and set the to be my number of lines (I think
2006 Sep 25
2
paste? 'cmd /c "c:\\pheno\\whap --file c:\\pheno\\smri --alt 1"'
Dear R users,
This command works (calling a programm -called whap- with file specifiers etc.):
>system('cmd /c "c:\\pheno\\whap --file c:\\pheno\\smri --alt 1 --perm 500"', intern=TRUE)
Now I need to call it from a loop to replace the "1" by different number, however I get lost using the quotes:
I tried numerous versions of:
>i<-1
2011 Aug 30
2
Error in evalauating a function
Hi,
? I am very new to R. So, pardon my dumb question. I was trying to write my own function to run a different model (perform an ordered logistic regression) using the example in website http://pngu.mgh.harvard.edu/~purcell/plink/rfunc.shtml
But R returns a error `R Error in eval(expr, envir, enclos) : object 's' not found' when I run it. What am I doing wrong here? Here's
2011 Dec 08
1
Ultra Xfinity 1500VA UPS
>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<
Pheno-Mint upsmon # /sbin/upsdrvctl start
Network UPS Tools - UPS driver controller 2.6.1
Network UPS Tools - Generic HID driver 0.35 (2.6.1)
USB communication driver 0.31
This PowerCOM device (0d9f:0004) is not (or perhaps not yet) supported
by usbhid-ups. Please make sure
2007 Mar 01
0
pheno package
Dear R-people,
I tried to use a command seqMK(x) of the pheno package. However, the
installation of the package fails with following error message:
Error in library(pkg, character.only = TRUE) :
'pheno' is not a valid package -- installed < 2.0.0?
What is the matter? Can anybody help me? I installed the latest version
of R.
Cheers,
Anja
--
2010 May 06
5
Apologies : question on transforming a table
Dear R-help list,
Apologies. I am trying to convert one table to another. It feels that it
should be a very straightforward answer with a single (or two) commands with
the right extensions, but I really can't figure this out right now. I have
several hundred pheno factors actually, so manually doing this line by line
is not an option.
My original table is approximately like this :
ID
2006 Aug 18
0
[Fwd: Trend test and test for homogeneity of odd-ratios]
I partly answered my question since independence_test() function in coin package apparently do
Cochran-Armitage trend test just like Eric Lecoutre's function tabletrend() - slightly modified here:
> independence_test(pheno ~ geno, data = dat2, teststat = "quad", scores = list(geno = c(0, 1, 2)))
Asymptotic General Independence Test
data: pheno by groups 1 < 2
2003 Sep 24
1
64-bit Oracle interface
Hi,
I am running the 64bit version of R on a AIX RS6000 cluster on which is
also running the ' SQL*Plus: Release 9.2.0.2.0' in the
'ORACLE-environment Version 64 bit AIX 5.1'.
I have problems setting up an Oralce database connection.
I can instantiate a driver using drv <- Oracle(). But when I try to
connect to my database using dbConnect (dbConnect(drv,
2008 Feb 01
2
pheno package (PR#10674)
Full_Name: Anja Eggert
Version: 2.4.1
OS:
Submission from: (NULL) (139.30.70.203)
I want to install the pheno package. This is not working. What can I do?
Thank you very much,
Anja
2011 Aug 24
0
lodplot help
I have a data frame (narrow) with 431 rows and 6 columns containing information on chromosome, position, lod1, lod2, lod3, lod4, looking like this:
> narrow
chr pos lod1 lod2 lod3 lod4
1 1 3.456 -0.025 -0.003 -0.209 -0.057
2 1 5.697 -0.029 -0.005 -0.200 -0.058
3 1 8.434 -0.049 -0.012 -0.247 -0.092
4 1 9.466 -0.074 -0.025 -0.300 -0.136
5 1 9.706
2010 Apr 29
1
R CMD check Error after R CMD build for R-2.11.0
Dear UseR,
I get an error when I run "R CMD check" on my .tar.gz file package,
and I don't understand why since I don't obtain any error with "R CMD
check" on the package directory. Do you have any idea ?
$ sudo ./R-2.11.0/bin/R CMD check eqtl_1.1.tar.gz
and
$ sudo ./R-2.11.0/bin/R CMD --check-subdirs=no eqtl_1.1.tar.gz
return an Error
* checking for working
2023 Mar 30
1
seqMK function
Hello does anyone know how to set the confidence level within the seqMK()
function in the pheno package. It seems to be set automatically at 0.05
and there seems to be neither an input function to set a different level,
as there are with some changepoint functions, nor an output to give one the
p-value of the changepoint identification which you get with functions ie
func$p_value etc ...
Thanks
2011 May 04
1
merging multiple columns from two dataframes
Hello,
I have data in a dataframe with 139104 rows which is multiple of 96x1449. i
have a phenotype file which contains the phenotype information for the 96
samples. the snp name is repeated 1449X96 samples. I haveto merge the two
dataframes based on sid and sen. this is how my two dataframes look like
dat<-data.frame(snpname=rep(letters[1:12],12),sid=rep(1:12,each=12),
2023 Apr 01
1
weird things in seqMK() and sqmk()
Hello The other say I posted a question about altering confidence limits
in the seqMK() function in the pheno package. I didn't get any bites but
in any case I've been trying to use this function. It seems to me to give
very odd results - sometimes identifying 8 or 9 changepoints in a
relatively short vector of maybe 40 elements, and at other times not giving
any changepoints at all,
2010 Mar 04
6
help
Hi all ,
I have one query.
i have list of some .cel files. in my program i have to mention the path of
these .cel files
part of my program is,
rna.data<-exprs(justRMA(filenames=file.names, celfile.path=*datadir*,
sampleNames=sample.names, phenoData=pheno.data,
cdfname=cleancdfname(hg18_Affymetrix U133A)))
in the place of "datadir" i have to mention the character string of the