Displaying 20 results from an estimated 37 matches for "pheno".
Did you mean:
phenom
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...
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, cat.pfoa, in the file of p...
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 <=quantile(pfas.pheno$log2pfoa,0.25, na.rm =T)]<-0
> cat.pfoa[pfas.pheno$log2pfoa >=quantile(pfas.pheno$log2p...
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
>system(paste(c("'cmd /c "c:\\pheno\\wha...
2018 Apr 20
1
create multiple categorical variables in a data frame using a loop
...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.
>>
>> 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(pf...
2010 Sep 24
1
color of lines while printing through for loop
...to my number of lines, but I don't know how to implement this into my
loop.
Is this possible?
This is my script:
__________________________________________________________________
###creating two emty vectors and opening a graphics window
x <- vector()
y <- vector()
plot(x,y, xlim = c(pheno.dt$year[1],pheno.dt$year[nrow(pheno.dt)]), ylim
= c(min(pheno.dt$julian, na.rm = TRUE),max(pheno.dt$julian, na.rm =
TRUE)), xlab = "Year", ylab = "Julian Day")
###setting up colors
sp_pheno.unique <- unique(pheno.dt$sp_pheno)
colors <- seq(1,200,1)
####printloop...
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 pheno
1 A Breast Cancer
2 A Appendicitis
3 A Microcephaly
4 B Polyps
5 B Autism
6 C Autism
7 D Breast Cancer
8 D Polyp...
2008 May 13
1
R help: problems with step function
...om rs13483699 and 4 from interactions. When I ran
add1 directly, I got Df=6 and AIC 848.75.
> step2.bic.out <- step(step.bic.out, scope=list(lower=scope.lower2,
upper=scope.upper2),
+ direction="both", k=log(length(step.bic.out$y)),
trace=1)
Start: AIC=841.18
pheno.dat ~ rs13479085 + rs13480057 + rs13482096 + rs8254221
Df Deviance AIC
+ rs13482096:rs13483699 4 216.63 840.63 (*)
<none> 233.82 841.18
- rs8254221 2 244.08 842.90
- rs13482096 2 245.20 844.31
......
Step: AIC=...
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 30
2
Error in evalauating a function
...ssion) 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 what I got from the debug file.
# Input data
n <- 10
PHENO <- c( 1, 3, 2, 3, 1, 1, 1, 2, 1, 2 )
c <- c( 1, 1, 0, 0, 0, 0, 0, 1, 0, 0 )
COVAR <- matrix( c , nrow = n , byrow=T)
CLUSTER <- c( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
l <- 22
g <- c( 0, 1, 1, 0, 0, 0, 1, 0, 2, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 2, 0, 0, 0, 2, 0, 0, 0, 1, 0, 1...
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,
Anj...
2008 May 14
0
Problems with step function
...om rs13483699 and 4 from interactions. When I ran
add1 directly, I got Df=6 and AIC 848.75.
> step2.bic.out <- step(step.bic.out, scope=list(lower=scope.lower2,
upper=scope.upper2),
+ direction="both", k=log(length(step.bic.out$y)),
trace=1)
Start: AIC=841.18
pheno.dat ~ rs13479085 + rs13480057 + rs13482096 + rs8254221
Df Deviance AIC
+ rs13482096:rs13483699 4 216.63 840.63 (*)
<none> 233.82 841.18
- rs8254221 2 244.08 842.90
- rs13482096 2 245.20 844.31
......
Step: AIC=...
2007 Mar 15
1
Incorrect matrix of spearman correlations .... in 64-bit Linux ... (PR#9568)
...ject shortened manually -- to pass anti-spam filters
Original-subject: Incorrect matrix of spearman correlations working \
large (24000 by 425 and 78 by 425 data frames) in 64-bit Linux machines;\
the same code gives correct results in 32-bits Win and Mac (PR#9568)
}}
cc_s<-cor(phenos,vec,method="spearman",use="pairwise.complete.obs")
this is a line copied from real script producing different results in 64
bit/Linux/R (wrong) and Mac&Win (correct)
The script was implemented on 4 machines with Linux 64, Suse 9-10, in 5 variants
of R -- versions from 2.3...
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 you have an up-to-date version...
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 ...
Tha...
2003 Sep 24
1
64-bit Oracle interface
...uot;)) I get the message:
Error in oraNewConnection(drv, ...) : RS-DBI driver: (ORA-12154:
TNS:could not resolve service name)
When I use oraNewConnection (oraNewConnection(drv,username="xxx",
password="xxx")) I get the message:
Error in oraNewConnection(drv, username = "pheno", password = "pheno") :
RS-DBI driver: (ORA-12541: TNS:no listener)
However, sqlplus works well and the listener is also running.
Any idea what could be the problem here?
joerg
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 < 3
chi-squared = 0.2268, df = 1, p-value = 0.6339
> tabletrend(with(dat2, table(pheno, geno)))
[1] 0.6338308
-------- Message...
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),
genoty...
2007 Mar 16
0
Incorrect matrix of spearman correlations .... in 64-bit (PR#9570)
...s anti-spam filters
>
> Original-subject: Incorrect matrix of spearman correlations working \
> large (24000 by 425 and 78 by 425 data frames) in 64-bit Linux machines;\
> the same code gives correct results in 32-bits Win and Mac (PR#9568)
> }}
>
> cc_s<-cor(phenos,vec,method="spearman",use="pairwise.complete.obs")
>
> this is a line copied from real script producing different results in 64
> bit/Linux/R (wrong) and Mac&Win (correct)
>
> The script was implemented on 4 machines with Linux 64, Suse 9-10, in 5 variants
&g...
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, despite visu...