It's a bit complicated. Is there any shorter way?
Is there possibility to read datas from .csv as matrix, like this which i
want to have?
--
View this message in context:
http://r.789695.n4.nabble.com/Matrix-in-R-tp4649426p4649429.html
Sent from the R help mailing list archive at Nabble.com.
_
Is there posiibility to read.table change in matrix?
When i used read.table it gave me:
V1 V2 V3 V4
[1,] "OsobaA" "10,00" "9,00" "8,00"
[2,] "OsobaB" "2,00" "3,00" "1,00"
[3,] "OsobaC" "5,00" "6,00" "4,00"
I want to change it in:
[1,] [2,] [3,] [4,
Thank you for help.
--
View this message in context:
http://r.789695.n4.nabble.com/Problem-with-if-tp4649180p4649182.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listi
Why it always gives me a 3?
> fun=function(x) {
+ if (x<-3) {
+ return(x)
+ } else {
+ if(x<2) {
+ return(x^2-1)
+ } else {
+ return(log(x))
+ }}}
>
> fun(-5)
[1] 3
> fun(0)
[1] 3
> fun(10)
[1] 3
> fun(-10)
[1] 3
>
--
View this message in context:
http://r.789695.n4.nabble.com/Problem-with-
Thank you for help.
--
View this message in context:
http://r.789695.n4.nabble.com/Problem-with-recursion-tp4649162p4649166.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailm
I know that maybe it will be stupid question.
What iswrong with it (i think that i have to do the "stop moment", but i
dont know how)
fibbonacci=function(x) {
while(x>0) {
if (x==1 || x==2) {
return(1)
} else fibbonacci(x-1)+fibbonacci(x-2)
}
}
--
View this message in context:
http://r.78969
Thanks for help, now its working.
--
View this message in context:
http://r.789695.n4.nabble.com/Problem-with-tp4649082p4649161.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/ma
Hi, can someone tell me what is wrong in this function:
ilecyfr=function(x){
if (x=0){
return(1)
} else {
k=0
while (abs(x)/10^k >0) {
k=k+1
} return(k)
}}
--
View this message in context:
http://r.789695.n4.nabble.com/Problem-with-tp4649082.html
Sent from the R help mailing list archive at N
*
ilecyfr=function(x){
if (x=0){
return(1)
} else {
k=0
while (abs(x)/10^k >1) {
k=k+1
} return(k)
}}
--
View this message in context:
http://r.789695.n4.nabble.com/Problem-with-tp4649082p4649084.html
Sent from the R help mailing list archive at Nabble.com.
___
9 matches
Mail list logo