Learn R Programming

rtpcr (version 2.1.2)

long_to_wide: Converts a 4-column qPCR long data format to wide format

Description

Converts a 4-column (Condition, gene, Efficiency, Ct) qPCR long data format to wide format

Usage

long_to_wide(x)

Value

A wide qPCR data frame

Arguments

x

a 4-column (Condition, gene, Efficiency, Ct) qPCR long data

Author

Ghader Mirzaghaderi

Details

Converts a 4-column (Condition, gene, Efficiency, Ct) qPCR long data format to wide format

Examples

Run this code

df <- read.table(header = TRUE, text = "
Condition	Gene	E	Ct
control	C2H2-26	1.8	31.26
control	C2H2-26	1.8	31.01
control	C2H2-26	1.8	30.97
treatment	C2H2-26	1.8	32.65
treatment	C2H2-26	1.8	32.03
treatment	C2H2-26	1.8	32.4
control	C2H2-01	1.75	31.06
control	C2H2-01	1.75	30.41
control	C2H2-01	1.75	30.97
treatment	C2H2-01	1.75	28.85
treatment	C2H2-01	1.75	28.93
treatment	C2H2-01	1.75	28.9
control	C2H2-12	2	28.5
control	C2H2-12	2	28.4
control	C2H2-12	2	28.8
treatment	C2H2-12	2	27.9
treatment	C2H2-12	2	28
treatment	C2H2-12	2	27.9
control	ref	1.9	28.87
control	ref	1.9	28.42
control	ref	1.9	28.53
treatment	ref	1.9	28.31
treatment	ref	1.9	29.14
treatment	ref	1.9	28.63")

long_to_wide(df)

Run the code above in your browser using DataLab