Displaying 11 results from an estimated 11 matches for "column4".
Did you mean:
column
2009 May 14
2
Function to read a string as the variables as opposed to taking the string name as the variable
I am writing a custom function that uses an R-function from the
reshape package: cast. However, my question could be applicable to
any R function.
Normally one writes the arguments directly into a function, e.g.:
result=cast(table1, column1 + column2 + column3 ~ column4,
mean) (1)
I need to be able to write this statement as follows:
result=cast(table1, string_with_columns ~ column4, mean) (2)
string_with_columns = group of functions that ultimately outputs:
"column1 + column2 + column3"
Statement 1 outputs the correct results because...
2013 Mar 21
2
Displaying median value over the horizontal(median)line in the boxplot
...Thank you so much for your help. I am very sorry for troubling you but I am very very new to this programming and to R as you can see.
<quote author='arun kirshna'>
Hi,
Lines1<-readLines(textConnection("Column1 -1,2,3,4,5,6,6,7
COlumn2- 3,4,5,6,7,8,8
Column3-- 45,66,7,8,89,
COlumn4-5,6,7,7,8,9
Column5 -5,6,7,8,8"))
vec1<-unlist(strsplit(Lines1,"-"))
dat1<-as.data.frame(t(read.table(text=vec1[grepl(",",vec1)],sep=",",fill=TRUE)))
row.names(dat1)<-NULL
colnames(dat1)<-tolower(gsub(" $","",vec1[grepl("^C&q...
2024 Jun 06
2
R Shiny Help - Trouble passing user input columns to emmeans after ANOVA analysis
...ndent variable
output$column_selector_3 <- renderUI({
req(data())
selectInput("column3", "Select second independent variable", choices =
names(data()))
})
# Select random variable
output$column_selector_4 <- renderUI({
req(data())
selectInput("column4", "Select random variable", choices =
names(data()))
})
# Assigning user inputs to correct variables
selected_columns <- reactive({
req(data(), input$column1, input$column2, input$column3, input$column4)
list(
dependent = data()[[input$column1]],
indepen...
2012 Jun 12
4
How to index a matrix with different row-number for each column?
here's my question: suppose I have a matrix:
mt<-matrix(1:12,ncol=6)
now I have a vector
vt<-c(1,2,2,2,1,2)
which means I want to get:
the 1st row for column1;
the 2nd row for column2;
the 2nd row for column3;
the 2nd row for column4;
...
that what I want is this vector:
1,4,6,8,9,12
Does anyone know how to do this fast?
I know I can use for-loop to travel all columns,but that's not what I want.
2009 Jul 07
2
How to separate the string?
Hi everyone,
Hi want to separate the string(column1) for example
column1 column2 column3 column4 column5 column6
bear b e a r
cat c a t
tiger t i g e r
I know how to do this in excel where using MID function.
Now I want to solve it using R. The list of strings is i...
2009 Aug 03
2
Some SQL Challenges
...Could any of you give me some help?
-in COLUMN1 change the format 20JAN2000:00:00:00 to 20JAN2000 and exclude
every row that date is different from 20.
-extract the first character in COLUMN2 and creat COLUMN3 with that value
ex:
COL2,COL3
135,1
461,4
247,2
-in every row in which COL3=5, value in COLUMN4=value in COLUMN5
-create COLUMN7 where if COLUMN6="north" then COLUMN7 value="N" else COLUMN7
value="X"
Ill be grateful for any help, thnks
--
View this message in context: http://www.nabble.com/Some-SQL-Challenges-tp24795946p24795946.html
Sent from the R help mailin...
2009 Mar 13
1
Realtime dialplan application versus REALTIME dialplan function
...uot; = "yes" ]?:326|20)
exten => 326,n,Goto(cfaccess,${cf_cfnum},1)
Here is the 1.4 dialplan to accomplish the same thing:
exten => 326,1,Set(row="${REALTIME(cfwd,exten,${EXTEN})}")
exten => 326,n,Set(column3=${CUT(row,"|",3)})
exten => 326,n,Set(column4=${CUT(row,"|",4)})
exten => 326,n,Set(cf_cfnum=${CUT(column3,"=",2)})
exten => 326,n,Set(cf_active=${CUT(column4,"=",2)})
exten => 326,n,GotoIf($["${cf_active}" = "no" ]?:326|20)
exten => 326,n,Goto(cfaccess,${cf_cfnum},1)
So I h...
2010 May 15
1
conditional calculations per row (loop versus apply)
...y to solve this using a function such as sapply or would I be better off just subsetting and applying each function separately on the appropriate subset before rejoining.
Thanks in advance.
Nick
Table.A
1
3
5
13
Table.B
4
6
10
20
Table.C
5321
3233
4532
Dataframe
Record Type.code Column3 Column4
1 1 0.4
2 3 0.25
3 4 100
4 20 150
5 5 0.4
6 4532 NA
I have no problem writing a foor loop to do this
for (i in 1:nrow(dataframe) ) {
if (Type.code[i]%in%Table.A) Reading[i]<-function 1
else
if (Type.code[i]%in%tTable.B) Reading[i]<-function 2...
2007 Oct 19
1
(no subject)
# Hello
# I have a question regarding pairwise calculations of a matrix using a
"for-loop."
# Below I have a matrix "X" with 8 columns. These are Genotypic data so
Column1 & Column2 is
# a unit, Column3 & Column4 is a unit, Column5 & Column6 is a unit, and
Coulmn7 & 8 is a unit.
# I have a loop designed to calculate the number of times an individual in
Column"i" & Column"j"
# has the same value and the same individual has two values that are the
same in Column"k" &...
2006 Apr 20
0
parsing arguments of a function
Hi,
I have a simple problem writing a function that is to be called like
Myfunction( Column1 = low, Column2 = high, Column3 = all, Column4 = all,
data = mydata)
{.
contourplot(z ~ mydata$Column3* mydata$Column3)
.
}
Where Column1 and Column1 are the names of the dataframe mydata.
How do I parse the arguments to obtain both, name and value of the
argument.
I tried strsplit(Column1, "=") which gives me two strings but then I...
2007 Oct 19
1
conduct pairwise column comparisons without comparing a column to itself
# Hello
# I have a question regarding pairwise calculations of a matrix using a
"for-loop."
# Below I have a matrix "X" with 8 columns. These are genotypic data so
Column1 & Column2 is
# a unit, Column3 & Column4 is a unit, Column5 & Column6 is a unit, and
Coulmn7 & 8 is a unit.
# I have a loop designed to calculate the number of times an individual in
Column"i" & Column"j"
# has the same value and the same individual has two values that are the
same in Column"k" &...