Fit a logistic regression code in R If I have 10 Variables (Q,W,E,R,T,Y,U,I,P,A) and I want Q  to be my response variable and other 9 to be my predictors variable. Do I write it in R like this 
EXAMPLE<-glm(Q~W+E+R+T+Y+U+I+P+A,family=binomial)
Furthermore, what if Q is Binary (goes from 1 to 0) and  all the other 9 variables are categorically numbered. is it still the same or do i need to write it diff in R
 A: If those are the only variables in the data frame (I presume you have then ten variables in a data frame? If not do it!), and that data frame is named foo, then the following is a simpler way to specify the model:
mod <- glm(Q ~ ., data = foo, family = binomial)

The . means all variables not already specified in the model.
?glm tells us what is acceptable for the response. This can be a numeric variable 0, 1, a factor with two or more levels (the first level is failure or 0, the other levels are success or 1), or a two column matrix with the first column being the successes and the second the failures.
If the predictor variables are numeric but should be factors, you should convert them first to factors. First look at the output from
str(foo)

and check whether the data types for the covariates are factor or not. Here is a worked example to follow using some dummy data in foo: 
foo <- data.frame(A = sample(10, 5), B = sample(10, 5),
                  C = sample(10, 5))

A is the response, B and C are the covariates that should be factors. The conversion can be done as follows
foo <- data.frame(A = sample(10, 5), B = sample(10, 5), C = sample(10, 5))
want <- names(foo) != "A"
foo[want] <- lapply(foo[, want], as.factor)

> str(foo)
'data.frame':   5 obs. of  3 variables:
 $ A: int  4 1 5 3 10
     $ B: Factor w/ 5 levels "2","5","6","7",..: 1 3 5 2 4
 $ C: Factor w/ 5 levels "1","2","6","8",..: 3 2 1 5 4

A: the correct way to fit such model in R is:
glm(Q~W+E+R+T+Y+U+I+P+A, family=binomial("logit"))
About the last question, I didn't understand if the independent variables are a) ordinal, b) non-ordinal, just with the numbers representing codes for nominal categories. In case a), you don't have to do anything. In case b), I recomend using factor(W) + factor(E) + ... factor(A). The regression output will show the results for each category of each variable, omitting just one which is the reference.
